François Schiettecatte’s Blog

October 2, 2007

MySQL 5.1.22

Filed under: General — François Schiettecatte @ 11:25 am

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.

So:

./scripts/mysql_install_db –force –datadir=/var/lib/mysql/data

Would produce:

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.

5 Comments »

  1. interesting

    Perhaps it tries to set up the mysql db tables as innodb and chokes on that?

    Comment by noel — October 19, 2007 @ 3:10 am

  2. I think that is indeed the case, but I would have thought that a better error message would be in order, or better documentation.

    Comment by François Schiettecatte — October 21, 2007 @ 9:45 pm

  3. Hi! nice find.

    I filed a bug report for it:

    http://bugs.mysql.com/bug.php?id=32470

    you can subscribe to it and see how it develops from here.

    Just a note that you do not have to uncomment the line in the my.cnf - you can simply pass:

    –default-storage-engine=MyISAM on the command line to mysql_install_db.

    Comment by Roland Bouman — November 17, 2007 @ 10:46 am

  4. Ah, as it turns out thebug is a duplicate of this one

    http://bugs.mysql.com/bug.php?id=31315

    Most likely it will be fixed in the next version

    Comment by Roland Bouman — November 19, 2007 @ 3:27 am

  5. Roland, thanks for looking into this and filing an issue, as well as for the workaround. I just assumed it was an oversight and worked around it.

    Comment by François Schiettecatte — November 23, 2007 @ 7:04 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Blog at WordPress.com.