Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Sounds like a typical permission problem, you need to ensure that your permissions can correctly read and write the database sock file.

SourceSource

If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with:

socket=/var/lib/mysql/mysql.sock 

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/

If the above doesn't fix the problem then its likely something else, Visit Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38) on Stack Overflow for more answers.

Sounds like a typical permission problem, you need to ensure that your permissions can correctly read and write the database sock file.

Source

If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with:

socket=/var/lib/mysql/mysql.sock 

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/

If the above doesn't fix the problem then its likely something else, Visit Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38) on Stack Overflow for more answers.

Sounds like a typical permission problem, you need to ensure that your permissions can correctly read and write the database sock file.

Source

If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with:

socket=/var/lib/mysql/mysql.sock 

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/

If the above doesn't fix the problem then its likely something else, Visit Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38) on Stack Overflow for more answers.

Source Link
Simon Hayter
  • 33.1k
  • 7
  • 60
  • 119

Sounds like a typical permission problem, you need to ensure that your permissions can correctly read and write the database sock file.

Source

If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with:

socket=/var/lib/mysql/mysql.sock 

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/

If the above doesn't fix the problem then its likely something else, Visit Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38) on Stack Overflow for more answers.