Answer the question
In order to leave comments, you need to log in
How to enter the code generator in Jii if it gives an Unknown database 'yii2advanced' error?
I installed the Jii framework, I want to go to the gii code generator, I don’t know the exact link to it, so I decided to register or log in somehow by admin, but when I try to register or log in, it gives an error:
"Database Exception - yii\db\Exception
SQLSTATE[HY000 ] [1049] Unknown database 'yii2advanced'
↵
Caused by: PDOException
SQLSTATE[HY000] [1049] Unknown database 'yii2advanced'
in C:\openserver523\domains\localhost\advanced\vendor\yiisoft\yii2\db\Connection.php at line 579"
Now I feel like I already have two problems: I don't know the link to the code generator and something doesn't work in registration/authorization (might need to generate a model)
Answer the question
In order to leave comments, you need to log in
No way ... With a run, kill yourself against the wall. To rid the world of "software" you can write...
Based on the errors, I can assume that -
...Unknown database 'yii2advanced'...- there is no such DB at you.
in C:\openserver523\domains\localhost\advanced\vendor\yiisoft\yii2\db\Connection.php at line 579"- write down your database connection settings there.
/index.php?r=gii will help you. If, of course, you enabled it in the config...
You need to set up a database connection.
If you have deployed the Advanced version, then this is done in common/config/mail-local.php
Answers to most other questions
It is not necessary to be logged in to access the GII. Enough
1. Create a database with the name yii2advanced (or another)
2. Set up a connection to the database in the config (you can in the common directory)
3. Go to /index.php?r=gii or if htcaccess is configured, then /gii
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question