Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I recently installed DirectAdmin on my server. During the installation process, DirectAdmin wanted to nuke my MySQL installation. I already had a Drupal installation on this server, but the DirectAdmin installer had already messed with my MySQL installation. I ended up copying the actual database files elsewhere in an attempt to preserve my database. After finishing the DirectAdmin installation and getting everything setup, I created a new database. I then copied the database files I salvaged to this database's directory. I can see the tables and data in phpMyAdmin just fine. I then edited the settings.php file for Drupal to use the new database name and credentials for the new database. Unfortunately, my site is all sorts of blown up. I've been Googling around and only seen permissions as a potential cause, which I don't think lines up. If you'd like to see the errors, the page is zerowalkgames.com. Anyone have any idea whatsoever as salvaging my Drupal site?

Thanks in advance

share|improve this question
    
More info - DirectAdmin reports the database size as 0.0 kb. In phpMyAdmin, after the Action column, each table in the database is listed as "in use." Perhaps it is a permissions issue as it's locked somehow? –  TheBeege Mar 7 '11 at 3:24
    
When attempting to repair the table via phpMyAdmin, I receive the error "admin_drupalDB.stormattribute repair Error Can't find file: './admin_drupalDB/stormattribute.... admin_drupalDB.stormattribute repair error Corrupt" –  TheBeege Mar 7 '11 at 3:26
    
So I got the errors to go away by modifying my my.cnf file to include datadir=/var/lib/mysql under mysqld and basedir=/var/lib/mysql under mysql.server. The Drupal page is back up but with the following error: "The mysqli error was: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)." –  TheBeege Mar 7 '11 at 3:34
    
That error was due to mysqld not running. Apparently something was wrong with the changes I made to my.cnf. Anyone have tips so far? –  TheBeege Mar 7 '11 at 3:43

1 Answer 1

I went to MySQL's IRC chat and found the answer. The permissions on the directory and files were wrong.

Here were the commands I used to resolve the issue:

chown -R mysql:mysql /var/lib/mysql/admin_drupalDB  
chmod 700 /var/lib/mysql/admin_drupalDB  
chmod 660 /var/lib/mysql/admin_drupalDB/*  
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.