I already have an instance of MySQL running a production system. I want to use the same machine to do other MySQL stuff without touching the other instance. I copied my.cnf and rerouted everything (port,datadir,etc). Running mysqld_safe using the new config stopped right away. I looked at the logs. Everything looked good until this line:
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
So, I run
mysql_install_db --datadir=my/new/db and get this:
Installing MySQL system tables... 091120 19:01:24 [ERROR] /usr/libexec/mysqld: unknown option '-e' Installation of system tables failed! Examine the logs in opt/mysqld/data/ for more information. You can try to start the mysqld daemon with: /usr/libexec/mysqld --skip-grant & and use the command line tool /usr/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/bin/mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in opt/mysqld/data/ that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
I'm not giving a -e option on my call. What do I do?
EDIT: I followed the instructions in the error and get access denied for 'root'@'localhost'. The server is running and the appropriate port is listening. How do I log-in after doing a skip-grant?