在mysql中创建新数据目录会产生很多错误

时间:2014-04-29 05:06:26

标签: mysql

我在我的fedora机器上安装了mysql服务器。现在我想在另一个端口上的同一台机器上运行另一个mysql服务器实例。

为此,我需要创建一个不同的数据目录。 Mysql服务器安装在默认位置/ usr / local / mysql上,默认数据目录位置是/ usr / local / mysql / data

现在我在发出此命令时创建新数据目录

./scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql2

它给了我很多错误,innodb说的是

InnoDB: Error number 17 means 'File exists'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2014-04-29 10:31:51 32072 [ERROR] InnoDB: Cannot create file './mysql/innodb_table_stats.ibd'

2014-04-29 10:31:51 32072 [ERROR] InnoDB: The file './mysql/innodb_table_stats.ibd' already exists though the corresponding table did not exist in the InnoDB data dictionary. Have you moved InnoDB .ibd files around without using the SQL commands DISCARD TABLESPACE and IMPORT TABLESPACE, or did mysqld crash in the middle of CREATE TABLE? You can resolve the problem by removing the file './mysql/innodb_table_stats.ibd' under the 'datadir' of MySQL.
ERROR: 1813  Tablespace for table '`mysql`.`innodb_table_stats`' exists. Please DISCARD the tablespace before IMPORT.
2014-04-29 10:31:51 32072 [ERROR] Aborting

我在这里做错了吗?

0 个答案:

没有答案