R
R
Roman Kozhevnikov2015-12-27 20:54:18
Yii
Roman Kozhevnikov, 2015-12-27 20:54:18

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

5 answer(s)
P
Papa, 2015-12-27
Stifflera @PapaStifflera

No way ... With a run, kill yourself against the wall. To rid the world of "software" you can write...

M
metallix, 2015-12-27
@metallix

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.
PS The solution of such errors is googled for one or two.

A
Andrey, 2015-12-27
@VladimirAndreev

/index.php?r=gii will help you. If, of course, you enabled it in the config...

F
Finsh, 2015-12-28
@Finsh

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

M
Max, 2015-12-28
@matios

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 question

Ask a Question

731 491 924 answers to any question