日期:2014-05-16  浏览次数:20635 次

error:linux(debian)安装mysql错误

/usr/local/mysql# scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql
Installing MySQL system tables...
091016? 5:50:35 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
091016? 5:50:35 [ERROR] Aborting

091016? 5:50:35 [Warning] Forcing shutdown of 2 plugins
091016? 5:50:35 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

Installation of system tables failed!? Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:
??? shell> /usr/local/mysql/bin/mysqld --skip-grant &

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

??? shell> /usr/local/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 /var/lib/mysql 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 are the
MySQL email archives available at http://lists.mysql.com/.

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

?? 这里发生错误,网上说用scripts/mysql_install_db --no-defaults --user=mysql就可以。
?? 但实际情况是这样还是错误,总是 unknown option '--skip-bdb'。
?? 这是因为安装过程中系统会从目录 /etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf 中寻找这个文件。在/etc/mysql下存在my.cnf这个文件,所以里面的一些参数设置和安装不符。
?? 将 /etc/下的mysql 文件夹移动到 /temp下,这样就不再影响安装。