MySQL 在初始数据库安装期间中止

MySQL 在初始数据库安装期间中止

Linux 版本:

shell> cat /proc/version
Linux version 3.2.0-4-686-pae ([email protected]) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.46-1+deb7u1

安装 MySQL 5.6.14 32 位。

我主要遵循以下安装说明http://dev.mysql.com/doc/refman/5.6/en/unix-postinstallation.html:

shell> dpkg -i /home/user/mysql-5.6.14-debian6.0-i686.deb
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> ln -s  /opt/mysql/server-5.6/mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .

当我运行安装脚本时:

shell> scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/var/lib/mysql

我收到此错误:

Installing MySQL system tables...2013-09-26 11:14:20 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2013-09-26 11:14:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-09-26 11:14:20 24642 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
2013-09-26 11:14:20 24642 [Note] InnoDB: The InnoDB memory heap is disabled
2013-09-26 11:14:20 24642 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-09-26 11:14:20 24642 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-09-26 11:14:20 24642 [Note] InnoDB: Using Linux native AIO
2013-09-26 11:14:20 24642 [Note] InnoDB: Not using CPU crc32 instructions
2013-09-26 11:14:20 24642 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-09-26 11:14:20 24642 [Note] InnoDB: Completed initialization of buffer pool
2013-09-26 11:14:20 24642 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2013-09-26 11:14:20 24642 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2013-09-26 11:14:20 24642 [Note] InnoDB: Database physically writes the file full: wait...
2013-09-26 11:14:20 24642 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2013-09-26 11:14:21 24642 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2013-09-26 11:14:21 24642 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2013-09-26 11:14:21 24642 [Warning] InnoDB: New log files created, LSN=45781
2013-09-26 11:14:21 24642 [Note] InnoDB: Doublewrite buffer not found: creating new
2013-09-26 11:14:21 24642 [Note] InnoDB: Doublewrite buffer created
2013-09-26 11:14:21 24642 [Note] InnoDB: 128 rollback segment(s) are active.
2013-09-26 11:14:21 24642 [Warning] InnoDB: Creating foreign key constraint system tables.
2013-09-26 11:14:21 24642 [Note] InnoDB: Foreign key constraint system tables created
2013-09-26 11:14:21 24642 [Note] InnoDB: Creating tablespace and datafile system tables.
2013-09-26 11:14:21 24642 [Note] InnoDB: Tablespace and datafile system tables created.
2013-09-26 11:14:21 24642 [Note] InnoDB: Waiting for purge to start
2013-09-26 11:14:21 24642 [Note] InnoDB: 5.6.14 started; log sequence number 0
2013-09-26 11:14:21 24642 [ERROR] Aborting

2013-09-26 11:14:21 24642 [Note] Binlog end
2013-09-26 11:14:21 24642 [Note] InnoDB: FTS optimize thread exiting.
2013-09-26 11:14:21 24642 [Note] InnoDB: Starting shutdown...
2013-09-26 11:14:23 24642 [Note] InnoDB: Shutdown completed; log sequence number 1600607
2013-09-26 11:14:23 24642 [Note]

我尝试过touch /usr/share/mysql/errmsg.sys使用 mysql 所有权,但这并没有改变任何东西。

我可以看到它正在写一些东西/var/lib/mysql

shell> ll /var/lib/mysql
total 110600
-rw-rw---- 1 mysql mysql 12582912 Sep 26 11:14 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Sep 26 11:14 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Sep 26 11:14 ib_logfile1
drwx------ 2 mysql mysql     4096 Sep 26 11:14 mysql
drwx------ 2 mysql mysql     4096 Sep 26 11:14 test

当我尝试时:

shell> bin/mysqld_safe --user=mysql &

我得到完全相同的错误输出。

我只是不知道。

答案1

来自评论:

可能是my.cnf您家中的某个地方或某个地方将 mysql 指向了其共享文件的/etc错误位置(/usr/share/...而不是)。/usr/local/...尝试将参数添加--no-defaultsmysql_install_db命令行中。来源

相关内容