unable to start up MySQL after installing the MySQL package in Solaris
Friday Jun 20, 2008
Sometime ago, after I installed the package-based MySQL Community Server 5.0.51a in my Solaris. I am unable to start it up, e.g.
su - mysql
bash-2.03$ ./bin/mysqld
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
080513 11:58:53 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080513 11:58:53 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...
080513 11:58:53 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
080513 11:58:53 InnoDB: Started; log sequence number 0 0
080513 11:58:54 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
I looked up and searched inside MySQL bugs, and think I may hit bug http://bugs.mysql.com/bug.php?id=31058
"The innodb log files are placed into /usr/local/mysql/data, so this is where mysqld expects to find the rest of the table files by default. Copying the contents of /var/lib/mysql/* to /usr/local/mysql/data/* and restarting mysqld resolves the problem, so the files are being created correctly, just in the wrong place.
Suggested fix:
Identification of the installation location during PKG builds is wrong and the files are being installed in the wrong place. This may relate to the directory installation issues that are also part of Bug #31057.
"
So, I copied all needed into my data directory below,
apple:/opt/mysql/mysql/data/mysql> cp /var/lib/mysql/mysql/* .
Then it can now start ok,
bash-2.03$ ./bin/mysqld
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
080513 12:26:16 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
080513 12:26:17 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
080513 12:26:17 InnoDB: Started; log sequence number 0 43655
080513 12:26:17 [Note] ./bin/mysqld: ready for connections.
Version: '5.0.51a' socket: '/tmp/mysql.sock' port: 3306 MySQL Community
Hope this can help someone facing this issue in Solaris.










