LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2004, 06:33 AM   #1
ewijaya
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
MySQL server problem after linking (mysql.sock)


Hi everybody,
when I execute this command as a su:
mysql --user=root --password resourcedb

I encounter this problem
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/
mysql/mysql.sock' (111)

I wanted to use my home directory as the repository for my database, so
I created a link between /var/lib/mysql/ with my /home/mysql/data file
with: ln -s /var/lib/mysql /home/edward/mysql/data

preceded by: chown -Rf mysql:mysql data

And in my /home/mysql/data directory contain these file
links_db/ localhost.err mysql.sock=
links_db2/ localhost.pid /resourcedb mysql@

And I am using Linux-Mandrake

Any idea how can I solve this problem?

Thanks so much for your time.

Regards
Edward
SINGAPORE
 
Old 01-18-2004, 02:19 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: MySQL server problem after linking (mysql.sock)

Quote:
Originally posted by ewijaya
Hi everybody,
when I execute this command as a su:
mysql --user=root --password resourcedb

I encounter this problem
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/
mysql/mysql.sock' (111)

I wanted to use my home directory as the repository for my database, so
I created a link between /var/lib/mysql/ with my /home/mysql/data file
with: ln -s /var/lib/mysql /home/edward/mysql/data

preceded by: chown -Rf mysql:mysql data

And in my /home/mysql/data directory contain these file
links_db/ localhost.err mysql.sock=
links_db2/ localhost.pid /resourcedb mysql@

And I am using Linux-Mandrake

Any idea how can I solve this problem?

Thanks so much for your time.

Regards
Edward
SINGAPORE
When running your mysql command, is mysqld even running to connect to at all?
 
Old 01-19-2004, 07:05 AM   #3
rhl_one
Member
 
Registered: Apr 2003
Location: IN
Distribution: Slackware 9.1
Posts: 37

Rep: Reputation: 15
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!


there is no mysql.sock on my slackware
i did install th database and it gave no errors.
i also dont have any init.d in my rc.d dirctory

when i start mysqld it says cannot run as root.
followed the sslamp guide posted in some other thread.

Last edited by rhl_one; 01-19-2004 at 07:08 AM.
 
Old 01-19-2004, 07:52 AM   #4
rhl_one
Member
 
Registered: Apr 2003
Location: IN
Distribution: Slackware 9.1
Posts: 37

Rep: Reputation: 15
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

now where do i do that when i dont have init.d
 
Old 01-19-2004, 09:46 AM   #5
rhl_one
Member
 
Registered: Apr 2003
Location: IN
Distribution: Slackware 9.1
Posts: 37

Rep: Reputation: 15
etc/init.d links to what??
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" vitopn Linux - General 3 05-21-2007 10:13 AM
MySQL 3.23.58-14 installation prolem - mysql.sock not found lightcom Linux - Software 4 02-23-2005 12:46 AM
can't connect to mysql through socket '/tmp/mysql.sock' Boby Programming 2 05-23-2004 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:24 PM.

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