创建/bi/mysql目录后,修改/etc/my.cnf datadir="/bi/mysql"
启动mysqld 发现发生以下错误提示:
/etc/init.d/mysqld start
Initializing MySQL database: WARNING: The host 'BGP-LF-DT0229' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
121101 18:51:56 [Warning] Can't create test file /bi/mysql/BGP-LF-DT0229.lower-test
121101 18:51:56 [Warning] Can't create test file /bi/mysql/BGP-LF-DT0229.lower-test
/usr/libexec/mysqld: Can't change dir to '/bi/mysql/' (Errcode: 13)
121101 18:51:56 [ERROR] Aborting
121101 18:51:56 [Note] /usr/libexec/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
/bi/mysql for more information.
You can try to start the mysqld daemon with:
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /bi/mysql that may be helpful.
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/bin/mysqlbug script!
按提示运行/usr/libexec/mysqld --skip-grant &
出现以下提示:
再次启动mysqld。 OK
/etc/init.d/mysqld start
Starting mysqld: [ OK ]
发觉启动mysql时发生以下错误:
解决方案:
更改/etc/my.cnf的内容,加上以下内容:
[client]
socket=/bi/mysql/mysql.sock
再次敲入mysql. OK!