I
I
Ilya Beloborodov2016-11-26 17:52:19
Yii
Ilya Beloborodov, 2016-11-26 17:52:19

Yii2 and migrations. Why can't connect to the database?

There is a project on Yii2, which was not developed by me. When performing migrations php yii migrate- hits an error

Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [2002] No such file or directory'
in /Applications/AMPPS/www/foodclub.loc/vendor/yiisoft/yii2/db/Connection.php:549

tell me what to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Beloborodov, 2016-11-26
@kowap

Everything is much easier. In the config I changed localhost to 127.0.0.1 - and everything worked

L
LyberTeam, 2017-03-14
@mynewvk

Regular expression:
One of the options. Should be used with the g flag.
The construction (?<=<br>).*$consists of several syntactic constructions:
The regular expression has the g flag, which means that we are looking for the first match. This flag can be omitted.
But the m - flag cannot be used, since it will give an empty value for the first line, because it also has a tag
and the end of the line - $, but there are no characters between them.

A
Alexey, 2017-03-14
@masterfreelance

https://regex101.com/r/KndlJl/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question