Moving Mysql to /home directory, websites are fine but The MySQL server is currently offline.
Hi this is my first thread. I love cpanel so much, it brings so much convince.
Let me briefly introduce my situation here.
Due to reach /var limitation. I moved /var/lib/mysql to /home/data/mysql directory
and than I removed the mysql folder in /var/lib/
Websites all are fine, I can manager database from whm.
I can manager database from website backends by using Adminer in Joomla.
Server status in WHM shows Mysql is up.
ISSUE:
When I logined to cpanel,
All of database session are malfunctional.
Phpmyadmin cannot be loaded,
Mysql Database shows following error message:
The MySQL server is currently offline.
Mysql::initcache() failed: The mysql server is offline.
Attempt:
I did research and tried to reset password on mysql root and users.
And I tired use
# /scripts/checkperlmodules "full "force
# /scripts/upcp "force
None of above are working.
Could you help me find out how to solve this issue?
-
You need to have a professional administrator doing this stuff. You likely just broke everything. Make sure you adjust the directory path in MySQL configuration Make sure you create a symlink from new to old directory 0 -
You need to have a professional administrator doing this stuff. You likely just broke everything. Make sure you adjust the directory path in MySQL configuration Make sure you create a symlink from new to old directory
Hi Thank you for your reply. I thought I messed up with some symlink or directory path. but the wired thing is all of my websites are fine. I follow exactly the same way in instruction on move mysql to /home/data path" 1. Stop MySQL Before making any changes, first make sure to stop mysql service refer to : - Removed - # service mysqld stop 2. Change Data Directory Now copy default MySQL data directory (/var/lib/mysql) to other location as per your requirement. Also set the required MySQL ownership on new directory location. As per below command, we are relocating data directory to /data/mysql. # cp -rap /var/lib/mysql /data/mysql # chown mysql.mysql /data/mysql Now edit MySQL default configuration file /etc/my.cnf and update values of datadir and socketvariable. Change From: datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock Change To: datadir=/data/mysql socket=/data/mysql/mysql.sock 3. Start MySQL After making all above changes. finally start MySQL service. Now it will use new data directory path # service mysqld start "0 -
If you don't know what you're doing, don't do it. Just because someone posted something on the interwebs as to 'how to do this' doesn't mean it works... This will end up killing services 0 -
Hello Are you able to connect to the MySQL server through back end as "root" and execute some db operations? If so the issue is less likely to be related with the data directory change. Check the cPanel logs and MySQL logs as well. As the issue happens only to cPanel, I think changing the theme may sometimes help. I remember one such incident with x3 theme. 0 -
Problem solved. by adding symlink for /var/lib/mysql to point to /home/data/mysql. Thanks all above =) 0 -
Hi this is my first thread. I love cpanel so much, it brings so much convince.
Welcome to the cPanel forums! We're happy you decided to post here.Problem solved. by adding symlink for /var/lib/mysql to point to /home/data/mysql. Thanks all above =)
I'm happy to see you were able to address the issue. Thank you for updating us with the outcome. Feel free to post again if you have any additional questions.0 -
I dont understand how i made the same the mysql is on but the websites ar not able to connect to bases, i can manage them from cpanel/whm ...etc but websites not connecting to them, after i reverse the changes and now ervice Error (XID qadjd6) The "mysql" service failed to start. Startup Log Starting MariaDB.191212 05:55:48 mysqld_safe Logging to '/var/lib/mysql/d9.domain.ro.err'. 191212 05:55:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql .../etc/init.d/mysql: line 264: kill: (3773210) - No such process ERROR! mysql has failed. Contact your system administrator if the service does not automagically recover. I changed the root mysql password the mysql started but the websites still not able to connect to database :| 0
Please sign in to leave a comment.
Comments
7 comments