Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use mysql for a web gallery, but yesterday it seems to stop working, so I tried to restart mysql and webserver, but mysql fail to start. The syslog have the following info about it:
Quote:
Jul 22 13:11:12 webserver mysqld_safe[3587]: started
Jul 22 13:11:12 webserver mysqld[3590]: ^G/usr/sbin/mysqld: Can't read dir of '/tmp/' (Errcode: 13)
Jul 22 13:11:12 webserver mysqld[3590]: ^G/usr/sbin/mysqld: File '/var/log/mysql/mysql-bin.index' not found (Errcode: 13)
Jul 22 13:11:12 webserver mysqld[3590]: 080722 13:11:12 [ERROR] Aborting
Jul 22 13:11:12 webserver mysqld[3590]:
Jul 22 13:11:12 webserver mysqld[3590]: 080722 13:11:12 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 22 13:11:12 webserver mysqld[3590]:
Jul 22 13:11:12 webserver mysqld_safe[3592]: ended
Jul 22 13:11:29 webserver /etc/init.d/mysql[3727]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul 22 13:11:29 webserver /etc/init.d/mysql[3727]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jul 22 13:11:29 webserver /etc/init.d/mysql[3727]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jul 22 13:11:29 webserver /etc/init.d/mysql[3727]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jul 22 13:11:29 webserver /etc/init.d/mysql[3727]:
I have searched for the error and have checked /tmp and all seems ok. I don't know what to do. I would appreciate any comment on this.
Have you check the /var/log/mysql directory, and the /var/run/mysqld directory? Are they there, and have they changed?
Also, check your MySQl configuration file, and see where it stores database files. Off the top of my head I don't remember, but I think it may be /var/spool/mysql, but please verify. Make sure that the directory exists. If it got nuked, you'll lose everything.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Does the ^G stand for 'bell'?
Both error messages are equally disturbing. Why would mysql not be able to read on /tmp?
Check the permissions in the /tmp dir. The sticky bit must be set. This is how it should look like: drwxrwxrwt 11 root root 11264 2008-07-22 21:06 /tmp
Did you check whether none of yours disks is full? Or inaccessible? Or not mounted? Or damaged?
Don't worry about the mysql-bin.index. It is not very important for your database, only if you want to roll back transactions. If mysql insists of having this file, I guess you could create an empty file. Or, if there are still file in that directory, put the file list in:
-rw-r----- 1 mysql adm 0 2008-07-11 19:33 mysql.err
-rw-r----- 1 mysql adm 0 2008-07-23 06:25 mysql.log
-rw-r----- 1 mysql adm 20 2008-07-22 07:03 mysql.log.1.gz
-rw-r----- 1 mysql adm 20 2008-07-20 06:25 mysql.log.2.gz
-rw-r----- 1 mysql adm 20 2008-07-18 06:25 mysql.log.3.gz
-rw-r----- 1 mysql adm 20 2008-07-17 06:25 mysql.log.4.gz
-rw-r----- 1 mysql adm 20 2008-07-16 06:25 mysql.log.5.gz
-rw-r----- 1 mysql adm 20 2008-07-15 06:25 mysql.log.6.gz
-rw-r----- 1 mysql adm 20 2008-07-12 06:25 mysql.log.7.gz
Another strange thing is that this lib is empty.
Quote:
webserver:~# ls -l /var/run/mysqld | more
total 0
webserver:~#
I have an Ubuntu server as well, and it has two files in same lib, and Ubuntu is based on Debian, so I assume it should have the same files on the same place. In that case, how could files being deleted?
To continue checking I made a new mysql install on another Debian Etch server, and then compared all mysql files, and I can't figure out what the problem could be anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.