Bug 19954 - mysqld will not start
Summary: mysqld will not start
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mysql
Version: 7.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Patrick Macdonald
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-28 13:41 UTC by Need Real Name
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-30 21:18:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2000-10-28 13:41:26 UTC
On a new RH7 installation and were MySQL has been upgraded with the new 
rpm's (version 3.23.24-1) the safe_mysqld will not start MySQL.

I can run the script /usr/bin/mysql_install_db with no errors.
When I then try to start the database, I run the script
/usr/bin/safe_mysqld, but the mysqld will not start.

In /var/lib/mysql/<servername>.err I get the following message:

mysqld started
/usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
mysqld ended

I have tried to change permision on the /var/lib/mysql directory, but 
MySQL will only start if I type: chmod 777 -R mysql/

After this I can run safe_mysqld without problems.

Comment 1 Trond Eivind Glomsrxd 2000-10-30 03:38:05 UTC
Try "service mysqld start" - this is the supported way, doing it manually
requires proper permissions on directories and support files (pid files, logs, etc)

Comment 2 Need Real Name 2000-10-30 21:14:39 UTC
To test I made a new installation with the your updated rpm's and then I tried 
to start the server as suggested.

It didn't work. The last linies of the file <servername>.err in /var/lib/mysql 
shows the following:

Number of processes running now: 0
001030 12:59:41  mysqld restarted
001030 12:59:42  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' 
(errno: 13)
001030 12:59:42  /usr/libexec/mysqld: Error on delete of '/var/run/mysqld.pid' 
(Errcode: 13)

Number of processes running now: 0
001030 12:59:42  mysqld restarted
001030 12:59:42  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' 
(errno: 13)
001030 12:59:42  /usr/libexec/mysqld: Error on delete of '/var/run/mysqld.pid' 
(Errcode: 13)

Number of processes running now: 0
001030 12:59:42  mysqld restarted
001030 12:59:42  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' 
(errno: 13)
001030 12:59:42  /usr/libexec/mysqld: Error on delete of '/var/run/mysqld.pid' 
(Errcode: 13)

Number of processes running now: 0
001030 12:59:42  mysqld restarted
001030 12:59:42  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' 
(errno: 13)
001030 12:59:42  /usr/libexec/mysqld: Error on delete of '/var/run/mysqld.pid' 
(Errcode: 13)

The problem is still permissions.
After the basic installation the permission on /var/lib/mysql was drwx------
With the updated rpm's the permission on /var/lib/mysql was drwxr-xr-x, but on 
the directory with the database /var/lib/mysql/mysql the permissions is drwx----
--

It will work if I type
cd /var/lib/mysql
chmod 777 mysql

What should the permissions be for this directory?



Comment 3 Trond Eivind Glomsrxd 2000-11-01 16:18:28 UTC
It needs to be 755 and owned by mysql(the user which runs the database) - nobody
but this user are supposed to be able to write to this directory. Running
safe_mysqld is not supported, and the service needs be started by root (the
startup scripts sus the database startup. It looks like you try from another
user, and this isn't supported.


Note You need to log in before you can comment on or make changes to this bug.