List:General Discussion« Previous MessageNext Message »
From:Yang Zhang Date:December 13 2009 7:08pm
Subject:Can't initialize mysqld data dir
View as plain text  
I'm trying to get started with running mysqld but I can't set up the
data directory. Any hints? Thanks in advance. Details follow:

$ uname -a
Linux #1 SMP Thu
Oct 1 14:41:38 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

$ mysql/bin/mysqld --version
mysql/bin/mysqld  Ver 5.4.3-beta for unknown-linux-gnu on x86_64
(MySQL Community Server (GPL))

$ cat my.cnf

$ mkdir data-mysql

$ mysql/scripts/mysql_install_db --basedir=mysql --datadir=./data-mysql
Installing MySQL system tables...
091213 13:45:13 [ERROR] Can't find messagefile
091213 13:45:13 [ERROR] Aborting

091213 13:45:13 [Note]

Installation of system tables failed!  Examine the logs in
./data-mysql/ for more information.

You can try to start the mysqld daemon with:

    shell> mysql//bin/mysqld --skip-grant &

and use the command line tool mysql//bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> mysql//bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in ./data-mysql/ that may be helpful.

The latest information about MySQL is available on the web at  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the mysql//scripts/mysqlbug script!

$ mysql//bin/mysqld --defaults-file=my.cnf --skip-grant
091213 14:04:18 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
091213 14:04:18  InnoDB: highest supported file format is Barracuda.
091213 14:04:19 InnoDB Plugin 1.0.4 started; log sequence number 44254
091213 14:04:19 [Warning] Can't open and lock time zone table: Table
'mysql.time_zone_leap_second' doesn't exist trying to live without
091213 14:04:19 [ERROR] Can't open and lock privilege tables: Table
'mysql.servers' doesn't exist
091213 14:04:19 [Note] mysql//bin/mysqld: ready for connections.
Version: '5.4.3-beta'  socket: '/tmp/mysql.sock'  port: 3307  MySQL
Community Server (GPL)

$ mysql//bin/mysql -u root mysql -e 'show tables;'
Yang Zhang
Can't initialize mysqld data dirYang Zhang13 Dec