Bug 19954 - mysqld will not start
mysqld will not start
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-28 09:41 EDT by Need Real Name
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-30 16:18:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-10-28 09:41:26 EDT
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-29 22:38:05 EST
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 16:14:39 EST
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 11:18:28 EST
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.