October 2, 2007 5 Comments
MySQL 5.1.22 became the first release candicate of the 5.1 version, so I decided to download it and install it. I have a version of my.cnf which is turned to work on larger systems (16GB & fast discs) and which I like to use it as a base for all the MySQL installations I make.
I was starting this one from scratch so needed to create the ‘mysql’ database using ‘mysql_install_db’. Sounds easy enough but I kept getting an error in the ‘mysqld.err’ log file.
./scripts/mysql_install_db --force --datadir=/var/lib/mysql/data
071001 19:55:33 [ERROR] Unknown/unsupported table type: innodb
071001 19:55:33 [ERROR] Aborting
071001 19:55:33 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
I eventually tracked this down to this statement in my.cnf:
# Default table storage engine when creating new tables
# (comment out when running mysql_install_db)
default_storage_engine = InnoDB
The statement tells MySQL to use innodb as the default storage engine for all new tables. For some reason this was causing ‘mysql_install_db’ to choke. I commented the statement out and everything worked as expected.
Once I had the ‘mysql’ database using ‘mysql_install_db’, I re-enabled the statement and MySQL started quite happily.