LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-14-2004, 03:23 PM   #1
fraz
Member
 
Registered: Nov 2004
Location: Edinburgh, Scotland
Distribution: Ubuntu
Posts: 149

Rep: Reputation: 15
MySQL.sock


Hi guys,
I am a newbie and am in the process of trying to set up my system.
I was trying to install mythtv and I guess I have succeeded except that it won't run.
When I attempt to run it I get a message about mysql.sock.
Code:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I did a little googling and came across some fixes for this, which seemed to be all about pointing at the file mysql.sock. Trouble is that I don't seem to have this on my system, even though I installed MySQL with linux.
Is this a file i need to create or has something gone horribly wrong.
 
Old 11-14-2004, 06:35 PM   #2
fraz
Member
 
Registered: Nov 2004
Location: Edinburgh, Scotland
Distribution: Ubuntu
Posts: 149

Original Poster
Rep: Reputation: 15
Don't worry managed to start it through services after much searching the web and head scratching, can't for the life of me understand why i was having problems but it's over now
 
Old 11-15-2004, 02:27 PM   #3
fraz
Member
 
Registered: Nov 2004
Location: Edinburgh, Scotland
Distribution: Ubuntu
Posts: 149

Original Poster
Rep: Reputation: 15
ok problems were not over, although I got the server running I still could not use it from the command line, I tried several different solutions nothing worked whenever i tried to run any command line programs like mysql or mysqladmin I got the above error.
I have finally cracked the problem wide open, only one thing remains, I write this in the hope that any other newbies like myself who have this problem can avoid the nightmare i have had. I say nightmare, but I love the challenge, that is why I chose a distro which isn't stable, steeper learning curve.

Ok here goes I owe all of this to other forums and other peoples expertise, I merely wanted to collect all of the info pertinent to me in one place.

first step was to kill any processes involving mysql
Code:
> killall mysqld
alternatively hunt and kill using
Code:
> lsof
to list all open files.
then use
Code:
> kill -KILL {pid}
where {pid} is the process ID number of any process of mysql, e.g. safe_mysqld

this should mean that you can start the server on port 3306 using
Code:
> mysql_install_db
> safe_mysqld &
you should NOT get a message saying mysqld ended. if you do your problem ain't the same as mine.

now when i tried to run any tools i was still getting the same old error I was always getting (and getting sick of)
after a little more searching I realised that the problem was that my computer was now called jelly no longer called localhost (the default) and I tried to start mysql with the following line
Code:
> mysql -h jelly
then to my surprise and joy up came
Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 3.23.58

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
So it does work, with no reinstalling at all.
Next the localhost needs to be set to whatever yours is.
 
  


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
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
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
MySQL server problem after linking (mysql.sock) ewijaya Linux - General 4 01-19-2004 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 11:34 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