Hi @Aleksandar Simovic ,
Thanks for posting this question in Microsoft Q&A platform.
As I understand the question, you are trying to access mysql through web ssh in Linux php app service, but getting this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Could you please try modifying bind-address to localhost and restart, if this helps.
sudo gksu gedit /etc/mysql/my.cnf
bind-address = 127.0.0.1
bind-address = localhost
sudo /etc/init.d/mysql restart
Another option is if your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with:
You can check if mysql is running with the following command:
mysqladmin -u root -p status
Try changing your permission to mysql folder. If you are working locally, you can try:
sudo chmod -R 755 /var/lib/mysql/
Hope this will help. Please let us know if any further queries.
- Please don't forget to click on or upvote button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification