Knowledgebase

mosecparse / mysql issues after moving db to another drive.

Posted by themedia, 01-07-2008, 06:53 AM
hi, i moved mysql to another drive, and i am getting these errors /etc/cron.hourly/modsecparse.pl: DBI connect('modsec:localhost','modsec',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /etc/cron.hourly/modsecparse.pl line 19 Unable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 19. [root@viper ~]# ls -la /var/lib/mysql/mysql.sock lrwxrwxrwx 1 root root 23 Jan 6 20:11 /var/lib/mysql/mysql.sock -> /home3/mysql/mysql.sock the socket exists. in cpanel - service manager mysql looks as down, and eximstats the same. any idea where is the config for modsec and chkserv so that i could set the new mysql.sock location? maybe that will work.

Posted by Patrick, 01-07-2008, 08:31 AM
If you moved MySQL to another location, have you updated the configuration file (/etc/my.cnf) to reflect the new location? Example: datadir=/home3/mysql/

Posted by Bilco105, 01-07-2008, 08:37 AM
Why not just remove the symlinks and mount your new drive as /var/lib/mysql?, thats generally what I do. If you have other data on the new disk, then you're better symlinking your entire mysql directory to the new drive, rather than just the socket file..; ln -s /home3/mysql /var/lib/mysql.

Posted by themedia, 01-07-2008, 08:49 AM
Are you serious? would it actually be MOVING the db to the other drive? if i did not move the data? and start the db?

Posted by themedia, 01-07-2008, 08:54 AM
solved: rm -rf /var/lib/mysql ln -s /home3/mysql /var/lib/mysql services look up. eximstats hopefully have no more trouble.

Posted by Bilco105, 01-07-2008, 10:17 AM
You're welcome

Posted by themedia, 01-07-2008, 10:52 AM
thanks actually i was just hoping i will not have to symlink, dunno why .. i just wanted it to be completely moved



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Billing software (Views: 501)


Language:

Client Login

Email

Password

Remember Me

Search