On new FreeBSD 5.4 Cpanel server, i tryed to transfer a new site (www.webhostingneeds.com) from another server for testing. The site uses Mambo CMS, but after moving the site it stoped working. Site shows offline page. So i checked and found MySQL server was not running on the server.
I tryed to restart MySQL Server through WHM services. Got following error
Attempting to restart mysql Waiting for mysql to restart…. . . . . . . . . . . finished.
mysql statusmysql has failed, please contact the sysadmin (result was “Warning, no valid mysql.sock file found.mysql has failed”).
It seems the problem was because i selected MySQL version 4.1 with OLD_PASSWORD in WHM. That says
MySQL Version to use (you must run Software/Update Server Software (or /scripts/mysqlup) for this to take affect. You should then run buildapache/easyapache after changing this option. You may also need to run /scripts/perlinstaller –force Bundle::DBD::mysql. Updating from mysql 4.0 to mysql 4.1 is not automaticlly reversable. You should backup your databases if you think you might wish to downgrade in the future.
So i run
Installation went well, but MySQL won’t sratr.
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
So checked the error log at /var/db/mysql/server20.hosthat.com.err
050917 7:17:18 [Warning] mysql.user table is not updated to new password format; Disabling new pa
ssword usage until mysql_fix_privilege_tables is run
050917 7:17:18 [Warning] Can’t open and lock time zone table: Table ‘mysql.time_zone_leap_second’
doesn’t exist trying to live without them
/usr/local/libexec/mysqld: ready for connections.
Version: ‘4.1.10a’ socket: ‘/tmp/mysql.sock’ port: 3306 FreeBSD port: mysql-server-4.1.10a
050917 7:17:21 [Note] /usr/local/libexec/mysqld: Normal shutdown
So i run /usr/local/bin/mysql_fix_privilege_tables
server20# cd /usr/local/bin/
This script updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.
This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION, or the more secure passwords in 4.1
Got a failure from command:
/usr/local/bin/mysql –no-defaults –force –user=root –host=localhost –database=mysql
Please check the above output and try again.
Running the script with the –verbose option may give you some information
of what went wrong.
If you get an ‘Access denied’ error, you should run this script again and
give the MySQL root user password as an argument with the –password= option
And it solved problem.
To auto start MySQL at boot time, added
Rebooted the server and MySQL is working fine now.
So i deleted the site www.WebHostingNeeds.com from the server and transfer it again. Now after the site transfer, everything is working fine.