源代码安装5.1./configure --prefix=/usr/local/mysql --with-extra-charsets=all --with-partition安装完了后:
运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
后
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表。这时启动mysql
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf没成功,查看日志存在如下错误:
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
090810 11:02:56 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090810 11:02:56 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-innodb'
090810 11:02:56 [ERROR] Aborting
不知如何是好!
运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
后
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表。这时启动mysql
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf没成功,查看日志存在如下错误:
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
090810 11:02:56 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090810 11:02:56 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-innodb'
090810 11:02:56 [ERROR] Aborting
不知如何是好!
觉得权限应该没有问题啊!
datadir=/usr/local/mysql/data/
user=mysql
language=/usr/local/mysql/share/mysql/english
tmpdir=/tmp
log-error=/var/log/mysqld.log
port = 3307
socket = /tmp/mysql.sock
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:/usr/local/mysql/bin/mysql_install_db --user=mysql
[root@localhost ~]# ls -ld /usr/local/mysql/data/mysql
drwx------ 2 mysql root 4096 06-30 11:29 /usr/local/mysql/data/mysql
不指定的话
这次连 /usr/local/mysql/data/这一层目录都没生成, 但我也不知道它生成到哪了!
chmod 0777 /usr/local/mysql/data/ -R
/usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql可是 /usr/local/mysql/data/mysql/ 里还是没有表!
试了,不过里边还是没东西!没生成相应的表!chown -R mysql.mysql /usr/local/mysql/data/
ls /usr/local/mysql/data/ -l
总计 8
drwxrwxrwx 2 mysql mysql 4096 08-10 11:48 mysql
drwxrwxrwx 2 mysql mysql 4096 08-10 11:48 testls /usr/local/mysql/data/* -l
/usr/local/mysql/data/mysql:
总计 0/usr/local/mysql/data/test:
总计 0
/usr/local/mysql
/usr/local
全改成mysql:mysql 0777了
后的结果:/usr/local/mysql/libexec/mysqld: ignoring option '--character-set-client-handshake' due to invalid value 'gb2312'Installation of system tables failed! Examine the logs in
/usr/local/mysql/data/ for more information.You can try to start the mysqld daemon with: shell> /usr/local/mysql/libexec/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 tablesTry 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql/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 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!
果真如此?mysql库里面不可能没有表和数据的。另外,还要有 information_schema 数据库吧。
你还是再安装一次吧。