howto create socket for MySQL
I just installed slackware 14 and I'm trying to get MySQL set up but the unix socket used by the server doesn't exist. I vaguely remember there is a script somewhere but I can't find it or any ref to it in the manual. This is 5.5.32-MariaDB. How do I get the create the socket?
|
Socket is usually just reference to IP and port.
Are you getting a message saying unable to create socket? If so what port is it complaining about? (5432 is the default for MySql). If you run "lsof -i :<port>" for whatever socket it is talking about see if it is already running a process. If it is that is why it can't create the new socket. You'd have to stop that process that was already running it. |
Quote:
Usually the "Unable to connect to socket" message you see is because the MariaDB/mysql server is not actually running. Read /etc/rc.d/rc.mysqld for instructions on getting it started the first time. |
ok, the server is not running. It starts and dies immediately. The log shows several errors, can't find files:
./mysql/plugin.frm (errno 13) can't open the mysql/plugin table Please run mysql_upgrade to create it (mysql_upgrade fails) Fatal error: Can't open and lock privilege tables:Can't find file ./mysql/host.frm ./mysql is drwx------ mysql root Ok, here is something: the files in ./mysql are root:root. Changing them to mysql:mysql allows the server to run. Maybe this is the answer, I'm checking it out. YES, THIS IS WORKING. Thank you all for the hints. |
Quote:
Not sure if you gave the path as ./mysql for brevity or if you set that as the path, but that will not work if you set it as the path because when the server starts next time at boot that path will not exist, or not be the same. |
"Not sure if you gave the path as ./mysql for brevity or if you set that as the path, ... "
Yes, brevity. The full path is /var/lib/mysql/mysql |
Quote:
Sounds like you have it going - great! |
All times are GMT -5. The time now is 03:52 PM. |