Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    2

    Default "The MySQL server is currently offline" after copying mysql data dir

    Hello all,
    I have, what I hope is, a fairly simple question.

    A little background first: I had a dedicated server with a hosting company, and recently switched over to another server with the same company. They removed my hard drive and placed it in the new server temporarily so that I could extract the data (trying to copy my users/data over WHM failed for some reason).
    One of the directories that I copied to the new machine was my mysql data directory (/var/lib/mysql). Now that I've moved it over, and chown'ed it to mysql.mysql (as in, "chown -R mysql.mysql /var/lib/mysql"), my databases seem to work fine. My PHP scripts are able to access the databases with no problems, just like they were before the server move.

    However, when I try to "manage" the databases through cpanel, I get an error saying "The MySQL® server is currently offline", and none of my databases or users appear. (see this screenshot: http://img153.imageshack.us/img153/8761/cpanelv.jpg - it is not my own screenshot, but it is what I am seeing)
    I cannot find much information about this on the internet, but a popular idea seems to be to reset the mysql root password via WHM, but the password reset fails.
    This lead me to think that maybe the permissions/ownership were incorrect for the "mysql" database (/var/lib/mysql/mysql), but according to the following screenshot, it looks like my permissions match what this blogger has posted (note that article itself can be ignored):
    Map MySQL Databases Outside /var/lib/mysql

    I'm also able to access and modify my databases through phpmyadmin.

    Have you seen this problem before, and/or would you be able to suggest a direction I could look in?
    I don't mind investigating and digging around, but I've spent several hours trying to figure this out myself, and I'm hoping someone here might have an idea as to what the problem might be.

    Thank you for your time

  2. #2
    Registered User
    Join Date
    Dec 2010
    Posts
    2

    Default Re: "The MySQL server is currently offline" after copying mysql data dir

    Hi again,
    I'm sorry for double posting, but I recieved a couple suggestions from my hosting company, so I thought I should give a little update:

    Usually this happen when you installed 2 instances of mysql. You should
    start by checking here.

    Also there is another knowns issue causing this, it is because the root
    password for mysql is too strong. You should change it to something else
    less complicated.
    Using "ps aux | grep mysql", I verified I am only running one instance of mysql, and I tried resetting my password to a single character, and WHM said it had reset, but I cannot check that it did reset.
    This has not fixed the problem.

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    1

    Default Re: "The MySQL server is currently offline" after copying mysql data dir

    I have this exact same problem after trying to create and associate database tables to users with the legacypostwww script

    My script is a simple bash script that creates a database and user when an account is first created. It works just fine. Whether or not it is related I am not sure, but suddenly I can no longer create databases/users with cpanel

    phpmyadmin still works exactly as expected for the root user. I have cleared out all of the databases and restarted mysql, as well as the server.

    Any help would really be appreciated!

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 05-16-2010, 09:53 AM
  2. Replies: 1
    Last Post: 05-16-2010, 09:53 AM
  3. NEED HELP: "SMTP error from remote mail server after end of data"
    By David Copeland in forum New User Questions
    Replies: 2
    Last Post: 02-20-2010, 08:22 PM
  4. Remote mysql and "eximstats" and "horde" database
    By torwill in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-17-2004, 12:30 PM
  5. Apache Rebuild: "Use System Mysql" and "Mysql Module"
    By fdesign in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-24-2003, 04:14 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube