Description:
mysql_install_db.pl creates empty system tables for "Patch 14136986: MySQL Database 5.5.25 ZIP for Windows x86 (64bit)" MySQL server. I tried on Windows XP and Mac OSX. The error messages are not shown on command line in Windows but are logged in the error log. Here is the output of running the command in Windows XP:
perl -w mysql_install_db.pl --basedir="C:\Program Files\MySQL\MySQL Server 5.5" --datadir="c:\MYSQL\DESERVER1\data" --force --verbose
Installing MySQL system tables...OK
Filling help tables...OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
C:\Program Files\MySQL\MySQL Server 5.5/bin/mysqladmin -u root password 'new-password'
C:\Program Files\MySQL\MySQL Server 5.5/bin/mysqladmin -u root -h WIN08R2MYSQLENT password 'new-password'
Alternatively you can run:
C:\Program Files\MySQL\MySQL Server 5.5/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd C:/Program Files (x86)/MySql/MySQL Server 5.1 ; C:\Program Files\MySQL\MySQL Server 5.5/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the C:/Program Files (x86)/MySql/MySQL Server 5.1/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
The error message that I first got was:
120611 10:28:14 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
120611 10:28:14 [ERROR] Aborting
Then it complains about other skip options in the script. I made it work by removing the following three lines from the script:
"--skip-innodb",
"--skip-bdb",
"--skip-ndbcluster",
That seems to have fixed the issue but I got the following errors at the end of error log (MySQL system tables and innodb data and log files were created though):
120608 17:10:45 InnoDB: 1.1.8 started; log sequence number 1595675
ERROR: 1406 Data too long for column 'url' at row 1
120608 17:10:45 [ERROR] Aborting
120608 17:10:45 InnoDB: Starting shutdown...
120608 17:10:46 InnoDB: Shutdown completed; log sequence number 1595675
120608 17:10:46 [Note] C:\Program Files\MySQL\MySQL Server 5.5/bin/mysqld.exe: Shutdown complete
The url column exists in one of the help tables help_topic. It looks like the schema creation script did not create the table with right column size. I had to modify the help table creation script that exists in basedir/share/mysql_system_tables.sql file and used TEXT column instead of char(128) in help_topic table and ran the mysql_install_db.pl script again with success.
Is it appropriate to use this method (updating the sql script) as a workaround for customers building production environments until the next release? Please let me know.
Thanks.
How to repeat:
First issue:
- Download and extract MySQL Database 5.5.25 ZIP for Windows x86 (64bit)
- Use mysql_install_db.pl script in scripts/ folder to create system database in any writable directory
perl mysql_install_db.pl --basedir="C:\Program Files\MySQL\MySQL Server 5.5" --datadir="c:\MYSQL\DESERVER1\data" --force --verbose
- Look for errors in error log
Second issue:
- After fixing the above issue by removing the following lines:
"--skip-innodb",
"--skip-bdb",
"--skip-ndbcluster",
The script runs successfully but with following errors:
120608 17:10:45 InnoDB: 1.1.8 started; log sequence number 1595675
ERROR: 1406 Data too long for column 'url' at row 1
120608 17:10:45 [ERROR] Aborting
120608 17:10:45 InnoDB: Starting shutdown...
120608 17:10:46 InnoDB: Shutdown completed; log sequence number 1595675
120608 17:10:46 [Note] C:\Program Files\MySQL\MySQL Server 5.5/bin/mysqld.exe: Shutdown complete
See description for how I fixed this issue.
Suggested fix:
Removing the following lines from the script:
"--skip-innodb",
"--skip-bdb",
"--skip-ndbcluster",
and modifying help tables schema.