Mysql

I i get every time error

Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect

when i try to mysql start
LVL 1
umaximAsked:
Who is Participating?
 
PapertripConnect With a Mentor Commented:
What are the directory permissions for /var/run/mysqld

Which user is mysqld supposed to run as?
0
 
Aaron TomoskySD-WAN SimplifiedCommented:
Is that file in that location?
0
 
umaximAuthor Commented:
it was work with root
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
PapertripCommented:
What OS is this?  How did you install mysql-server?  How are you starting mysqld?

Unless you purposely changed something to have it run as root, it's probably not.  You can start it as user root but the actual process will be ran as a non-privileged user.

What are the directory permissions for /var/run/mysqld ?
0
 
PapertripCommented:
@umaxim are you still having this issue?
0
 
PapertripCommented:
Hi umaxim, any update on this?
0
 
umaximAuthor Commented:
I doun the error
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.