LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-16-2012, 03:50 PM   #1
Wad3
LQ Newbie
 
Registered: Jul 2012
Posts: 15

Rep: Reputation: Disabled
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.

Last edited by Wad3; 10-16-2012 at 04:18 PM. Reason: additional info
 
Old 10-16-2012, 05:21 PM   #2
Wad3
LQ Newbie
 
Registered: Jul 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-16-2012, 05:36 PM   #3
Wad3
LQ Newbie
 
Registered: Jul 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply

Tags
connect, failed, mysql, mysqld



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix won't start after testing virtual domain maps and can view logs! jonizen Linux - Server 1 10-02-2011 04:21 AM
MySQL won't start, and no /etc/init.d/mysql--my stdout and syslog after trying... ineloquucius Linux - Server 8 01-31-2010 11:24 AM
How to have Mysql to start query logs ponganthony Linux - Server 1 10-18-2007 09:02 PM
Firefox Won't Start, No Err Logs, Net seems OK scottflyer Linux - General 1 05-26-2006 02:09 AM
mysql won't start... dynamic link error SerfurJ Linux - Software 2 11-20-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration