LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mysql won't start - Timout Error - Logs blank (http://www.linuxquestions.org/questions/linux-server-73/mysql-wont-start-timout-error-logs-blank-4175432575/)

Wad3 10-16-2012 03:50 PM

Mysql won't start - Timout Error - Logs blank
 
Last night I ran a new backup scripts that did a mysql dump of all data. Today the server was running fine, and then started to loose connection to certain tables. When I tried service mysqld restart it gave me an error:
Code:

"chown: cannot access `/var/lib/mysql\r': No such file or directory"
. With that \r it looked as if a file was in the wrong format.

I opened the the /etc/my.cnf and set the format to unix with:
Code:

set fileformat=unix
and saved it.

Now restarting the mysqld gives me:
Code:

Timeout error occurred trying to start MySQL Daemon.
The /etc/my.cnf file error log is pointing to /var/log/mysqld.log but that is blank.

I also tried setting the

Thanks for any direction on this. Would removing mysql and reinstalling it help? I'm keeping that as a last resort if it's just a file or setting problem. The script I ran just used a simple
Code:

mysqldump --user=myuser --password=mypass--all-databases --add-drop-table > /media/usbdisk/WebBackups/tmp_backup/backup.sql
What permission should etc/my.cnf have and should it be owned by root?

Also, if I do status check on mysqld it says it's running... but fails to start.


Thanks for any help.

Wad3 10-16-2012 05:21 PM

Here is my backup script that I'm sure has something to do with this. The crontab wouldn't run if I didn't set the PATH. Would setting the PATH in my backupscript cause mysql not be able to find my.cnf or other important files?

Code:

#!/bin/sh

date
echo "############### Backing up files on the system... ###############"

PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin

backupfilename=web_backup_`date '+%Y-%m-%d'`

echo "----- Deleting old SQL and dump new data... -----"
rm -f /media/usbdisk/WebBackups/tmp_backup/backup.sql

mysqldump --user=***** --password=***** --all-databases --add-drop-table > /media/usbdisk/WebBackups/tmp_backup/backup.sql

echo "----- Now tar, then zip up all files to be saved... -----"
tar cvf /media/usbdisk/WebBackups/DailyBackups/${backupfilename}.tar /home/* /var/www/* /etc/php.ini /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/* /etc/ssh/* /usr/java/jdk/* /media/usbdisk/WebBackups/tmp_backup/backup.sql
gzip /media/usbdisk/WebBackups/DailyBackups/${backupfilename}.tar
rm /media/usbdisk/WebBackups/DailyBackups/${backupfilename}.tar
chmod 666 /media/usbdisk/WebBackups/DailyBackups/${backupfilename}.tar.gz

echo "############### Deleting old backups... ###############"
find  /media/usbdisk/WebBackups/DailyBackups/ -name 'web_backup_*' -mtime +7 -delete

echo "############### Completed backing up system... ###############"
date


Wad3 10-16-2012 05:36 PM

I found a post that said that if the /var folder gets too full it can cause this problem. I deleted a few things and everything is back up.


All times are GMT -5. The time now is 05:11 AM.