MySQL Server won't start in Gentoo
I had MySQL and everything working fine and then yesterday ran emerge -u world. This seems to have killed mysql though.
When I try to run /etc/init.d/mysql start, I get: "MySQL NOT started (0)"
When I run /usr/bin/mysqld_safe & mysqladmin -u root password '[passwd here]' , I get:
can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' (2)
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Well, mysqld is not running (that's what I'm trying to do) and the directory /var/run/mysqld/ is empty, so this socket doesn't seem to exist.
I have no idea what socket I used before since it used to just work.
btw, mysql does seem to start on startup, but doesn't seem to work properly. When I run
/etc/init.d/mysql restart, it gives me:
/etc/init.d/mysql: line 334: /var/run/mysqld/mysqld.pid: No such file or directory
Stopping mysqld (0)
Strange, the socket file already exist in "/var/run/mysqld/mysqld.sock"
it will be removed now and re-created by the MySQL server
BUT please make our checks.
Starting mysql (/etc/mysql/my.cnf)
MySQL NOT started (0)
I'm not sure if there are repair utilities I can use or what log files to look into.
I've now looked under /var/log/mysql/mysql.err and get the following:
Can't start server: Bind on TCP/IP port: Address already in use
Do you already have another mysqld server unnon on port: 3306
Have you tried issuing killall mysqld and killall mysqld_safe?
When I try any of those, I get "no processes killed"
One other thing, when I reboot the machine, mysql is supposedly running and mysqld.pid and mysqld.sock are present. But, when I try to restart mysqld, they go away.
Do this: Go into your /etc/init.d/mysql script. There should be something toward the top about using sockets and to uncomment (or comment out, I forget exactly which) a line in that script to not use sockets. I did this a couple months back. It's pretty self explanatory.
Then do a mysql restart. You should then be able to connect.
That did the trick.
This must be one the changes from the previous version of mysql to this one.
Thank you much.
|All times are GMT -5. The time now is 08:11 AM.|