[root@BIDB scripts]# ../support-files/mysql.server start
Starting MySQL........The server quit without updating PID file (/mydata/mysql/BIDB.pid).[FAILED]
[root@BIDB scripts]# vi /etc/my.cnf
查看日志:
点击(此处)折叠或打开
- 140928 12:46:21 mysqld_safe mysqld from pid file /mydata/mysql/BIDB.pid ended
- 140928 12:48:43 mysqld_safe Starting mysqld daemon with databases from /mydata/mysql
- 2014-09-28 12:48:43 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
- 2014-09-28 12:48:43 66983 [Note] Plugin \'FEDERATED\' is disabled.
- /my/mysql/bin/mysqld: Table \'mysql.plugin\' doesn\'t exist
- 2014-09-28 12:48:43 66983 [ERROR] Can\'t open the mysql.plugin table. Please run mysql_upgrade to create it.
- 2014-09-28 12:48:43 66983 [Note] InnoDB: Using atomics to ref count buffer pool pages
- 2014-09-28 12:48:43 66983 [Note] InnoDB: The InnoDB memory heap is disabled
- 2014-09-28 12:48:43 66983 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2014-09-28 12:48:43 66983 [Note] InnoDB: Compressed tables use zlib 1.2.3
- 2014-09-28 12:48:43 66983 [Note] InnoDB: Using CPU crc32 instructions
- 2014-09-28 12:48:43 66983 [Note] InnoDB: Initializing buffer pool, size = 100.0G
- 2014-09-28 12:48:49 66983 [Note] InnoDB: Completed initialization of buffer pool
- 2014-09-28 12:48:50 7ff1edc84720 InnoDB: Operating system error number 13 in a file operation.
- InnoDB: The error means mysqld does not have the access rights to
- InnoDB: the directory.
- 2014-09-28 12:48:50 7ff1edc84720 InnoDB: Operating system error number 13 in a file operation.
- InnoDB: The error means mysqld does not have the access rights to
- InnoDB: the directory.
- 2014-09-28 12:48:50 66983 [ERROR] InnoDB: Creating or opening ./ibdata1 failed!
- 2014-09-28 12:48:50 66983 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
- 2014-09-28 12:48:50 66983 [ERROR] Plugin \'InnoDB\' init function returned error.
- 2014-09-28 12:48:50 66983 [ERROR] Plugin \'InnoDB\' registration as a STORAGE ENGINE failed.
- 2014-09-28 12:48:50 66983 [ERROR] Unknown/unsupported storage engine: InnoDB
- 2014-09-28 12:48:50 66983 [ERROR] Aborting
- 2014-09-28 12:48:50 66983 [Note] Binlog end
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'partition\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_DATAFILES\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_TABLESPACES\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_FOREIGN_COLS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_FOREIGN\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_FIELDS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_COLUMNS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_INDEXES\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_TABLESTATS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_SYS_TABLES\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_INDEX_TABLE\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_INDEX_CACHE\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_CONFIG\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_BEING_DELETED\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_DELETED\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_FT_DEFAULT_STOPWORD\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_METRICS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_BUFFER_POOL_STATS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_BUFFER_PAGE_LRU\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_BUFFER_PAGE\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP_PER_INDEX_RESET\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP_PER_INDEX\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMPMEM_RESET\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMPMEM\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP_RESET\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_CMP\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_LOCK_WAITS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_LOCKS\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'INNODB_TRX\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'PERFORMANCE_SCHEMA\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'ARCHIVE\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'BLACKHOLE\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'MRG_MYISAM\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'MEMORY\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'CSV\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'MyISAM\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'sha256_password\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'mysql_old_password\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'mysql_native_password\'
- 2014-09-28 12:48:50 66983 [Note] Shutting down plugin \'binlog\'
- 2014-09-28 12:48:50 66983 [Note] /my/mysql/bin/mysqld: Shutdown complete
我也是尝试了好多次。
1、修改/etc/my.cnf 文件。要跟实际的一样
2、到MySQL的安装目录下面的script
./mysql_install_db --basedir=/my/mysql --no-defaults --skip-name-resolve --user=mysql --datadir=/mydata/mysql/data
这是重新初始化MySQL。
3. 切换到suppsupport-files 目录下启动MySQL
./mysql.server start.
经验总结:
1、上面的有可4能一次不行,多执行几次。
2、注意这两个参数确性:
basedir = /my/mysql ----MySQL安装路径
datadir = /mydata/mysql/data ----MySQL的数据文件存放位置