MySQL wont start Errors - Please help

beansbaxter

Verified User
Joined
Mar 17, 2004
Messages
218
Location
WA
Help, I cannot restart MySQL on my DA server running CentOS 5.5. It was running fine, then rebooted my server and now it won't start. I tried reinstalling it but get the following errors:

Code:
[root@server custombuild]# cd /usr/local/directadmin/custombuild/
[root@server custombuild]# ./build set mysql_inst yes
Changed mysql_inst option from yes to yes
[root@server custombuild]# ./build mysql
Cannot find /usr/bin/mysqldump
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.1.60-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.1.60-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.1.60-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.1.60-1.glibc23.x86_64.rpm
Stopping mysqld ...
/etc/init.d/mysqld: line 260: my_print_defaults: command not found
/etc/init.d/mysqld: line 263: my_print_defaults: command not found
 ERROR! MySQL manager or server PID file could not be found!
Cannot find /usr/bin/mysql, installing MySQL
Preparing...                ########################################### [100%]
	package MySQL-shared-5.1.60-1.glibc23.x86_64 is already installed
	package MySQL-devel-5.1.60-1.glibc23.x86_64 is already installed
/etc/init.d/mysqld: line 260: my_print_defaults: command not found
/etc/init.d/mysqld: line 263: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL manager (/usr/bin/mysqlmanager) or server (/usr/bin/mysqld_safe)
Giving mysqld a few seconds to start up...
cp: `/usr/lib/libmysqlclient.so' and `/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
/etc/init.d/mysqld: line 260: my_print_defaults: command not found
/etc/init.d/mysqld: line 263: my_print_defaults: command not found
/etc/init.d/mysqld: line 260: my_print_defaults: command not found
/etc/init.d/mysqld: line 263: my_print_defaults: command not found
 ERROR! MySQL manager or server PID file could not be found!
/etc/init.d/mysqld: line 260: my_print_defaults: command not found
/etc/init.d/mysqld: line 263: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL manager (/usr/bin/mysqlmanager) or server (/usr/bin/mysqld_safe)
It is recommended to do "./build php n" after MySQL update.
[root@server custombuild]#
 
Last edited:
Hello,

Check:
Code:
rpm -qa | grep MySQL
to see what's installed. Ensure there are only 4 rpms installed (server, devel, client, shared), and that there are no duplicates with different versions.

Also check:
Code:
cd /var/lib/mysql
ls -la
where you'll want to see everything chowned to "mysql:mysql". Also check the contents of /var/lib/mysql/mysql, as all main mysql bits live there.

You could also try:
Code:
cd /usr/local/directadmin/custombuild/mysql/
rpm -Uvh --force MySQL-*5.1.60-1*
in case any of the rpms are half-installed.

John
 
The first thing only showed shared installed, not the other three. The last thing you recommended finished some rpm installations and now it all works good again.

Wow! Thank you soooo much for the support, I appreciate it! Many thanks!
 
Hi,

I got similar error while nothing changeed after your guide
Code:
 [root@s2 custombuild]# ./build mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.1.70-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.1.70-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.1.70-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.1.70-1.glibc23.x86_64.rpm
Stopping mysqld ...
 ERROR! MySQL manager or server PID file could not be found!
Updating MySQL 5.1.70 to 5.1.70
Preparing...                ########################################### [100%]
        package MySQL-shared-5.1.70-1.glibc23.x86_64 is already installed
        package MySQL-server-5.1.70-1.glibc23.x86_64 is already installed
        package MySQL-devel-5.1.70-1.glibc23.x86_64 is already installed
        package MySQL-client-5.1.70-1.glibc23.x86_64 is already installed
Starting MySQL. ERROR! Manager of pid-file quit without updating file.
Giving mysqld a few seconds to start up...
Looking for 'mysql' as: /usr/bin/mysql
Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Running 'mysqlcheck with default connection arguments
/usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
/usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
cp: `/usr/lib/libmysqlclient.so' and `/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
 ERROR! MySQL manager or server PID file could not be found!
Starting MySQL. ERROR! Manager of pid-file quit without updating file.
It is recommended to do "./build php n" after MySQL update.
 
Back
Top