Nov 222010
Initialize MySQL Data Directory
Answer:
When you compiled a new MySQL server, it is needed to create a default data directory.
To do so, you need to use the mysql_install_db command.
# bin/mysql_install_db --user=mysql \
--basedir=/opt/mysql/mysql \
--datadir=/opt/mysql/mysql/data
The --datadir is the target directory for storing the database files, where --basedir specifies the MySQL server base directory.
Reference: http://dev.mysql.com/doc/refman/5.0/en/mysql-install-db.html