PDA

View Full Version : mysql problem



ieuuk
27th October 2005, 08:52 PM
hey, ive managed to wreck mysql on my server... every time i try to start the service i get



Initializing MySQL database: [ OK ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]


i've tried removing the mysql packages and putting them back again but i still have the problem. Is there anyway i can get it to remove everything related to it and just go back to how it was when it was first installed?

any help appreciated, thanks...

giulix
27th October 2005, 09:11 PM
I guess 'yum remove mysql' should do the trick... but first I would check the log files and try (as root)
sh -v /etc/init.d/mysqld start

ieuuk
27th October 2005, 09:33 PM
nothing much in the log files... when i try and run the command you said i get:



/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping 2>&1
/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping 2>&1
/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping 2>&1
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

exit $?


and doing a yum remove and a yum install just leaves me with the same problem.

ieuuk
27th October 2005, 10:01 PM
fixed... had to reset the root password for mysql



Stop mysqld and restart it with the --skip-grant-tables --user=root options (Windows users omit the --user=root portion).

Connect to the mysqld server with this command:

shell> mysql -u root

Issue the following statements in the mysql client:

mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;

Replace newpwd with the actual root password that you want to use.

You should be able to connect using the new password.

giulix
27th October 2005, 10:02 PM
Hadn't seen previous post... glad to hear that.

giulix
27th October 2005, 10:22 PM
...and 2 :rolleyes: