MySQL didn't install properly, system data/accounts are corrupted, string of issues.

Protected

Verified User
Joined
Oct 29, 2006
Messages
77
Hey there. I've been installing DA on a new server. I installed normally with setup.sh then manually run custombuild a couple of times in order to make a few changes.

At first I thought everything had gone well, so I put several hours into moving files and installing programs into the server (which makes it undesirable to start from scratch at this point). Then I tried restoring an admin backup from another server, and it returned an error about being unable to talk to mysql (the error was in the message system report I received after restoring the backup; everything else went well).

After a bit more digging I found out mysql wasn't running at all, and in fact refused to even start with a cryptic error message about the PID file. Looking at the error log I finally found that a library, "libaio", was missing. I installed that from the centos repository and the error changed, as apparently the root/admin user data was inconsistent or missing.

At this point I started looking online for a solution. The suggestions I found and attempted included running some mysql executables such as mysql_install_db, checking the permissions on /var/lib/mysql/mysql or deleting said folder (by the way, it was empty), etc. Eventually I decided to delete /var/lib/mysql entirely and reinstall using custombuild.

After successfully reinstalling, I could finally start mysql and it would stay running, which was an improvement. However, directadmin still couldn't talk to it. So I looked online again and found http://help.directadmin.com/item.php?id=45 .

I couldn't login as root, so I followed step 1 and changed my mysql root password. This appears to have worked. Then I attempted to set the password for da_admin as described in step 2 to the one in /usr/local/directadmin/conf/mysql.conf . However, this resulted in the following error: ERROR 1820 (HY000): You must SET PASSWORD before executing this statement .

Any idea of what I should do next? This issue has already eaten up several hours and is becoming extremely frustrating. Thanks in advance for your time.
 
Firstly, I would like to mention that libaio is included in pre-installation commands: http://help.directadmin.com/item.php?id=354. This link is found in http://www.directadmin.com/installguide.html.

About your situation, you did not need to remove /var/lib/mysql, but if it's now removed, to change the password of DA admin user, please do:
Code:
mysql -uroot -p
SET PASSWORD FOR 'da_admin'@'localhost' = PASSWORD('[B]newdapass[/B]');

If da_admin user does not exist, then please run the following commands:
Code:
mysql -uroot -p
CREATE USER 'da_admin'@'localhost' IDENTIFIED BY '[B]newdapass[/B]';
GRANT ALL PRIVILEGES ON *.* TO 'da_admin'@'localhost' WITH GRANT OPTION;

Don't forget to replace the password in /usr/local/directadmin/conf/mysql.conf afterwards. Good luck! :)
 
Hello and thanks for the reply. Seeing how some libraries were not installed before directadmin was installed, would you recommend that I start over from scratch (blank hard drive)? If not, is there anything I should reinstall? I just checked and gd, libcap-devel and libtool were also missing from those listed in that page you linked to.
 
You don't need to reinstall, but I would highly recommend executing the commands listed on that page for the future (otherwise it might cause issues like you had).
 
Back
Top