LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-12-2016, 11:03 AM   #1
BAKABON
Member
 
Registered: Sep 2016
Distribution: kali linux
Posts: 47

Rep: Reputation: 7
mysql problem


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")
i get this error when i run the command : "mysql -u root -p"
i m currently using manjaro linux.
 
Old 09-12-2016, 11:07 AM   #2
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
What does:
Code:
netstat -ln | grep mysqld
Say?
 
Old 09-12-2016, 11:29 AM   #3
BAKABON
Member
 
Registered: Sep 2016
Distribution: kali linux
Posts: 47

Original Poster
Rep: Reputation: 7
nothing

the command was just executed successfully without an error but didnt give me any output.
 
Old 09-12-2016, 11:46 AM   #4
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by BAKABON View Post
the command was just executed successfully without an error but didnt give me any output.
Well, that most likely means that you do not have a mysql server up and running, since it is not listening on any port.

How did you start your mysql server, if at all?

Also, what does:
Code:
ps aux | grep mysql
say?
 
Old 09-12-2016, 12:37 PM   #5
BAKABON
Member
 
Registered: Sep 2016
Distribution: kali linux
Posts: 47

Original Poster
Rep: Reputation: 7
[bakabon@bakabon-Xenon mysql]$ ps aux | grep mysql
root 3758 0.0 0.1 70072 4864 pts/0 T 22:54 0:00 sudo mysqld_safe
root 3759 0.0 0.0 13888 3252 pts/0 T 22:54 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 3873 0.1 3.0 656468 121084 pts/0 Sl 22:54 0:00 /usr/bin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/bakabon-Xenon.err --pid-file=bakabon-Xenon.pid --socket=/run/mysqld/mysqld.sock --port=3306
bakabon 4000 0.0 0.2 43024 9360 pts/0 S+ 22:56 0:00 mysql
bakabon 4023 0.0 0.0 10764 2104 pts/1 S+ 22:58 0:00 grep --colour=auto mysql
 
Old 09-12-2016, 01:43 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Do you have a /run directory in your system?
Look like a setup error to me (should be /var/run)
 
Old 09-12-2016, 01:55 PM   #7
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by keefaz View Post
Do you have a /run directory in your system?
Look like a setup error to me (should be /var/run)

/run
is simply a symlink to /var/run (at least on arch linux) so it shouldn't really matter.

Best regards,
HMW
 
Old 09-12-2016, 02:00 PM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by HMW View Post

/run
is simply a symlink to /var/run (at least on arch linux) so it shouldn't really matter.

Best regards,
HMW
Ah thanks !

To Op: Did you check /run/mysqld content and permissions?
 
Old 09-13-2016, 01:25 AM   #9
BAKABON
Member
 
Registered: Sep 2016
Distribution: kali linux
Posts: 47

Original Poster
Rep: Reputation: 7
how do i do it?
 
Old 09-13-2016, 04:51 AM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Kali Linux is your installed OS?

I ask because I heard there are no other user than root in setup, and mysql requires 'mysql' user and group

Anyway, you can check permissions and content with the ls command
Code:
ls -l /run/mysqld
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with MySQL install on virt CentOS,no /var/lib/mysql/mysql.sock , systemctl start mysqld.service dont run the service Positive1 CentOS 1 08-13-2016 03:33 AM
postfix +Cyrus SASL authentication problem + pam-mysql+mysql database kibirango Slackware 1 12-25-2012 08:47 AM
[SOLVED] yum install php-mysql create problem to my running mysql database jsaravana87 Linux - Server 1 08-11-2011 03:24 AM
Problem Starting MySQL on Fresh Fedora 8 Install w/ Yum'd MySQL blong4life Linux - Server 2 07-04-2008 07:44 PM
php-mysql dependancy problem after nitemare mysql upgrade. RHEL4 andrewc Red Hat 1 01-03-2006 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration