Bug #3669 Mysql fails with little information when without permissions to /var/lib/mysql
Submitted: 5 May 2004 21:25 Modified: 5 May 2004 22:05
Reporter: Jonathan Fors Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.0.16 OS:Linux (Gentoo GNU/Linux)
Assigned to: Dean Ellis CPU Architecture:Any

[5 May 2004 21:25] Jonathan Fors
Description:
I discovered that my mysql server wouldn't start, and begun debugging it, but the debug information that mysql gave me was very unhelpful. All it said was "mysql ended" when running mysqld_safe with the -T option. 
After searching some forums I discovered that it was the folder /var/lib/mysql that had the wrong owner set. I did a quick chown -R mysql:mysql /var/lib/mysql and it worked. Now, I'd like to help other people that might get the same trouble. Mysqld should definently tell the user that it cannot write to the folder.

How to repeat:
1. By changing the permissions on the database folder (/var/lib/mysql in my case) so that mysql can't write to it.
2. Try to restart the server.

Suggested fix:
A message like "Error: Permissions to low on /var/lib/mysql; cannot write" would be very helpful.
[5 May 2004 22:05] Dean Ellis
Your mysqld error log would, actually, have contained the permission denied error(s), so check there first if you have future similar problems.
[5 May 2004 22:48] Jonathan Fors
I checked the /var/log/mysql/* files, but they were empty. But perhaps the permissions on the logfiles were wrong too. I'd better check that out...