Bug #7535 MYSQL 4.1.8 fails to start out of the box (Mac OS X 10.3.7)
Submitted: 25 Dec 2004 16:58 Modified: 5 Feb 2005 16:43
Reporter: John Mallery Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:4.1.8 OS:MacOS (Mac OS X 10.3.7)
Assigned to: CPU Architecture:Any

[25 Dec 2004 16:58] John Mallery
Description:
Note that you have a series of reports of this problem on your installation forum and there has 
been no response from MySQL developers. See: <http://forums.mysql.com/search.php?
0,search=STOPPING+server+from+pid+file,page=1,match_type=PHRASE,match_dates=30,matc
h_forum=ALL,body=1,author=,subject=1>

I am upgrading from MySQL 4.1.7 to MySL 4.1.8.

I installed from the binary installed, stopped mysql 4.1.7.

I executed the following shell commands as root.

chown -R mysql:mysql /usr/local/mysql/

/usr/local/mysql/bin/safe_mysqld &

I get this print out:

[Relatus:/Users/jcma] jcma# Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/Relatus.local.pid
041225 11:53:28  mysqld ended

Here is  a dired of the  data directory:

  /usr/local/mysql/data:
  used 40984 available 53254816
  drwxr-x---   9 mysql  mysql       306 25 Dec 11:53 .
  drwxr-xr-x  19 mysql  mysql       646 25 Dec 10:22 ..
  -rw-rw----   1 mysql  mysql      1142 25 Dec 11:53 Relatus.local.err
  -rw-rw----   1 mysql  mysql   5242880 25 Dec 11:53 ib_logfile0
  -rw-rw----   1 mysql  mysql   5242880 25 Dec 11:53 ib_logfile1
  -rw-rw----   1 mysql  mysql  10485760 25 Dec 11:53 ibdata1
  drwxr-x---   2 mysql  mysql        68 14 Dec 16:13 mysql
  drwxr-x---   2 mysql  mysql        68 14 Dec 16:13 test
  -rw-r--r--   1 mysql  mysql      4919 25 Dec 11:09 xmy.cnf

Here is the contents of Relatus.local.err:

041225 11:53:27  mysqld started
041225 11:53:27 [Warning] Setting lower_case_table_names=2 because file system for /usr/
local/mysql/d\
ata/ is case insensitive
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
041225 11:53:27  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
041225 11:53:27  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
041225 11:53:27  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
041225 11:53:28  InnoDB: Started; log sequence number 0 0
041225 11:53:28 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't 
exist
041225 11:53:28  mysqld ended

How to repeat:
See above sequence.

Suggested fix:
It looks like the privilege tables  are not getting set up correctly.
[25 Dec 2004 17:16] John Mallery
My next step  was to rename /usrs/local/mysql/data/ and copy the entire data  directory from 
version 4.1.7 using:

cp -Rp "/usr/local/mysql-standard-4.1.7-apple-darwin6.8-powerpc/data/"  "/usr/local/mysql-
standard-4.1.8-apple-darwin7.6.0-powerpc/data/"

After invoking 

/usr/local/mysql/bin/safe_mysqld &

MySQL 4.1.8 comes up and works.

I'm not sure if there are changes within the directories /usr/local/mysql/data/mysql/ and /usr/
local/mysql/data/test/ that should be preserved from the original 4.1.8 installation. Please advise.
[2 Feb 2005 17:16] John Pollard
I too am getting the same error on attempting to start up mysql on Mac OS X 10.3 from a brand new installation ([ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist)
This happens for mysql 4.1.8 and 4.1.9
It seems that on an initial install it may be ok, but I have had problems with dropping and then recreating a database, so decided to start with a fresh install. I assume all mysql files are contained within /usr/local/mysql so I do find it hard to see how an earlier installation can affect this.
I too found that copying the entire data directory from a previous working installation (even from the same release 4.1.9 fixes the problem). Very odd.
[5 Feb 2005 16:43] Jorge del Conde
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/
[7 Feb 2005 3:25] John Joseph Bachir
This is because the OS X update makes incorrect permissions on /tmp AND/OR make /tmp a real directory instead of a symlink to... /etc/tmp? /private/tmp? i can't remember.

see my saga and solution here:

http://blog.johnjosephbachir.org/index.php?p=122
[9 Feb 2005 12:01] no forms
MySQL 4.1.9.
I obtain this error on my laptop (Mac OS X) after installing version 4.1.9 (previously I was using 4.0.7). After the new installation I was unable to start the mysql server (error: STOPPING server from pid file /usr/local/mysql/data/puffin.local.pid).

I try to delete all the /usr/local/mysql* directories and reinstall, but nothing change (I always obtains error).

The I delete the /Library/Receipts/mysql-standard*.pkg

The new installation that I made after this works fine.