Debian
MySQL 在初始數據庫安裝期間中止
Linux 版本:
shell> cat /proc/version Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (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 &
我得到完全相同的錯誤輸出。
我只是不知道。
從評論:
my.cnf
您家中的某個地方或/etc
將 mysql 指向錯誤位置(/usr/share/...
而不是/usr/local/...
)的共享文件可能存在。嘗試將參數添加--no-defaults
到mysql_install_db
命令行。來源