0
votes

I am using vagrant command line tool.After i used vagrant up command,i am getting the below error in my browser while running.

PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (line 79 of /drupal/docroot/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php).

1
Is MySQL running and if so, is that the correct location for the socket file?Phil
Are you conbevting to a mysql instance running on the box, or elsewhere?Elias Van Ootegem
I am getting this error while running this command: mysql -uroot -p pswd ERROR:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).user6443579
you run the command from inside the VM or from your host ? are you sure that mysql is running ?Frederic Henri

1 Answers

0
votes

Please check the mysql service is running inside the VM.

service mysqld status