cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
Ill PM you the ticket in a short while

I followed this instruction here: How to resolve the issues with var being bloated due /var/lib/mysql (mysql)?

You can fix this issue by symlinking or symbolic of of /var/lib/mysql to /home directory. Follow the following steps using SSH with root access:

First go to your SIM configuration (if you have one) /usr/local/sim/conf.sim and modify mysql to false

Then go to your WHM using root access Main >> Service Configuration >> Service Manager and disable mysql

# transfer to the new mysql directory
cp -r /var/lib/mysql/ /home/mysql_moved/

# backup the mysql directory
mv /var/lib/mysql/* /home/mysql_moved/mysql/backupmysql/

# correct permissions
chown -R mysql:mysql /home/mysql_moved/mysql/

# remove the old mysql data directory
rm -rf /var/lib/mysql/

# symlink old mysql directory to new directory
ln -s /home/mysql_moved/mysql /var/lib/mysql

# fix mysql.sock by symlinking
rm -rf /tmp/mysql.sock
ln -s /home/mysql_moved/mysql/mysql.sock /tmp/mysql.sock

Then go to your WHM using root access Main >> Service Configuration >> Service Manager and enable mysql

Then restart mysql:

/scripts/restartsrv mysql
mysql is now restarting and working fine.

But I don't know if cPanel backup will backup the mysql properly if I didnt edit my.cnf file?

I am now checking top and i saw this:
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.hostname.com.pid --skip-external-locking
 

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
Can cPanel guys confirm if their cpbackup will backup the mysql data properly if I didnt edit the my.cnf file?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Can cPanel guys confirm if their cpbackup will backup the mysql data properly if I didnt edit the my.cnf file?
The path stored by the MySQL configuration directive "datadir" is the same path used to backup the "Entire MySQL Directory." To ensure a proper backup the "datadir" directive should be updated; not performing this step will add unnecessary risk.

If the stock-default MySQL data directory is retained via a symlink, this should still allow for the directory contents to be saved in backup, but again, if using a custom path for the MySQL data directory I would adamantly recommend to properly update the MySQL configuration and avoid unnecessary risk.
 

tangowebs

Well-Known Member
Oct 12, 2004
93
0
156
We followed the instructions and when we try to restart mysql appears this error:

[email protected] [~]# service mysql restart
MySQL manager or server PID file could not be found! [FAILED]
Starting MySQLCouldn't find MySQL manager (/home/mysql/bin/mysqlmanager) or server (/home/mysql/bin/mysqld_safe) [FAILED]
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
We followed the instructions and when we try to restart mysql appears this error:

[email protected] [~]# service mysql restart
MySQL manager or server PID file could not be found! [FAILED]
Starting MySQLCouldn't find MySQL manager (/home/mysql/bin/mysqlmanager) or server (/home/mysql/bin/mysqld_safe) [FAILED]
Please see the following two posts for corrective measures (settings in the MySQL configuration):
cPanel Forums - View Single Post - Move MySQL Databases
cPanel Forums - View Single Post - Move MySQL Databases