./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
不知如何是好!
21 个解决方案
#1
我设置的安装路径 datadir=/usr/local/mysql/data/
归属 mysql:root 0700 用root运行的 mysql_install_db
觉得权限应该没有问题啊!
归属 mysql:root 0700 用root运行的 mysql_install_db
觉得权限应该没有问题啊!
#2
ll /usr/local/mysql/data/mysql
看一下这些表是否存在?
看一下这些表是否存在?
#3
不存在!
#4
my.cnf中几个基本选项:
basedir=/usr/local/mysql
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
basedir=/usr/local/mysql
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
#5
设置好这个my.cnf后我便运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
运行后,/usr/local/mysql/data/ 出现了 mysql test两个目录,但里边都没有表!
运行后,/usr/local/mysql/data/ 出现了 mysql test两个目录,但里边都没有表!
#6
/usr/local/mysql/data/mysql
看一下权限。
看一下权限。
#7
你把data目录下的所有东西删除
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:
/usr/local/mysql/bin/mysql_install_db --user=mysql
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:
/usr/local/mysql/bin/mysql_install_db --user=mysql
#8
[root@localhost ~]# ls -ld /usr/local/mysql/data/mysql
drwx------ 2 mysql root 4096 06-30 11:29 /usr/local/mysql/data/mysql
#9
把权限都加上 chmod 777
#10
不指定的话
这次连 /usr/local/mysql/data/这一层目录都没生成, 但我也不知道它生成到哪了!
#11
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/ 里还是没有表!
#12
同样的版本,为什么在另一台服务器上安装很顺畅,没出这个问题!
#13
试下这个后再执行/usr/local/mysql/bin/mysql_install_db命令:
chown -R mysql.mysql /usr/local/mysql/data/
chown -R mysql.mysql /usr/local/mysql/data/
#14
试了,不过里边还是没东西!没生成相应的表!
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 test
ls /usr/local/mysql/data/* -l
/usr/local/mysql/data/mysql:
总计 0
/usr/local/mysql/data/test:
总计 0
#15
父目录一级有没有给权限?
/usr/local/mysql/data/
/usr/local/mysql
/usr/local
/usr/local/mysql/data/
/usr/local/mysql
/usr/local
#16
全改成mysql:mysql 0777了
#17
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表。
这就是问题所在。
这就是问题所在。
#18
运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
后的结果:
/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 tables
Try '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!
后的结果:
/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 tables
Try '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!
#19
问题解决了,我系统中已经存在一个mysqld正在运行,并且占用了端口3306!
我本想将新编译的例程端口设为3307,仅仅设置了[client]段中的port参数,忘了设置[mysqld]段的!
应该是这个问题,我的系统里现在运行着两个mysql!
我本想将新编译的例程端口设为3307,仅仅设置了[client]段中的port参数,忘了设置[mysqld]段的!
应该是这个问题,我的系统里现在运行着两个mysql!
#20
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表?
果真如此?mysql库里面不可能没有表和数据的。另外,还要有 information_schema 数据库吧。
你还是再安装一次吧。
果真如此?mysql库里面不可能没有表和数据的。另外,还要有 information_schema 数据库吧。
你还是再安装一次吧。
#21
只不过 information_schema 库并不形成一个单独的文件夹。
#1
我设置的安装路径 datadir=/usr/local/mysql/data/
归属 mysql:root 0700 用root运行的 mysql_install_db
觉得权限应该没有问题啊!
归属 mysql:root 0700 用root运行的 mysql_install_db
觉得权限应该没有问题啊!
#2
ll /usr/local/mysql/data/mysql
看一下这些表是否存在?
看一下这些表是否存在?
#3
不存在!
#4
my.cnf中几个基本选项:
basedir=/usr/local/mysql
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
basedir=/usr/local/mysql
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
#5
设置好这个my.cnf后我便运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
运行后,/usr/local/mysql/data/ 出现了 mysql test两个目录,但里边都没有表!
运行后,/usr/local/mysql/data/ 出现了 mysql test两个目录,但里边都没有表!
#6
/usr/local/mysql/data/mysql
看一下权限。
看一下权限。
#7
你把data目录下的所有东西删除
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:
/usr/local/mysql/bin/mysql_install_db --user=mysql
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:
/usr/local/mysql/bin/mysql_install_db --user=mysql
#8
[root@localhost ~]# ls -ld /usr/local/mysql/data/mysql
drwx------ 2 mysql root 4096 06-30 11:29 /usr/local/mysql/data/mysql
#9
把权限都加上 chmod 777
#10
不指定的话
这次连 /usr/local/mysql/data/这一层目录都没生成, 但我也不知道它生成到哪了!
#11
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/ 里还是没有表!
#12
同样的版本,为什么在另一台服务器上安装很顺畅,没出这个问题!
#13
试下这个后再执行/usr/local/mysql/bin/mysql_install_db命令:
chown -R mysql.mysql /usr/local/mysql/data/
chown -R mysql.mysql /usr/local/mysql/data/
#14
试了,不过里边还是没东西!没生成相应的表!
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 test
ls /usr/local/mysql/data/* -l
/usr/local/mysql/data/mysql:
总计 0
/usr/local/mysql/data/test:
总计 0
#15
父目录一级有没有给权限?
/usr/local/mysql/data/
/usr/local/mysql
/usr/local
/usr/local/mysql/data/
/usr/local/mysql
/usr/local
#16
全改成mysql:mysql 0777了
#17
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表。
这就是问题所在。
这就是问题所在。
#18
运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
后的结果:
/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 tables
Try '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!
后的结果:
/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 tables
Try '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!
#19
问题解决了,我系统中已经存在一个mysqld正在运行,并且占用了端口3306!
我本想将新编译的例程端口设为3307,仅仅设置了[client]段中的port参数,忘了设置[mysqld]段的!
应该是这个问题,我的系统里现在运行着两个mysql!
我本想将新编译的例程端口设为3307,仅仅设置了[client]段中的port参数,忘了设置[mysqld]段的!
应该是这个问题,我的系统里现在运行着两个mysql!
#20
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表?
果真如此?mysql库里面不可能没有表和数据的。另外,还要有 information_schema 数据库吧。
你还是再安装一次吧。
果真如此?mysql库里面不可能没有表和数据的。另外,还要有 information_schema 数据库吧。
你还是再安装一次吧。
#21
只不过 information_schema 库并不形成一个单独的文件夹。