LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   MySQL.sock (https://www.linuxquestions.org/questions/fedora-35/mysql-sock-254785/)

fraz 11-14-2004 03:23 PM

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.

fraz 11-14-2004 06:35 PM

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

fraz 11-15-2004 02:27 PM

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.


All times are GMT -5. The time now is 11:43 PM.