MySQL赢得';不要在Linux上启动

MySQL赢得';不要在Linux上启动,mysql,Mysql,我有一个新的mysql服务器安装(通过yum安装)将不会启动 bash-4.1# /sbin/service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED] /etc/my.cnf已设置为默认值: # For advice on how to change settings please see # http://dev.

我有一个新的mysql服务器安装(通过yum安装)将不会启动

bash-4.1# /sbin/service mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
/etc/my.cnf已设置为默认值:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
我收到的错误是:

2016-02-16T22:47:18.453320Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2016-02-16T22:47:18.888497Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-02-16T22:47:18.889955Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11) starting as process 4321 ...
2016-02-16T22:47:19.016515Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-02-16T22:47:19.016568Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-02-16T22:47:19.016583Z 0 [Note] InnoDB: Uses event mutexes
2016-02-16T22:47:19.016596Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-02-16T22:47:19.016609Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-02-16T22:47:19.016631Z 0 [Note] InnoDB: Using Linux native AIO
2016-02-16T22:47:19.018127Z 0 [Note] InnoDB: Number of pools: 1
2016-02-16T22:47:19.018819Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-02-16T22:47:19.052517Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-02-16T22:47:19.071855Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-02-16T22:47:19.078235Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-02-16T22:47:19.092945Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-16T22:47:19.107542Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-02-16T22:47:19.107588Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-02-16T22:47:19.160738Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-02-16T22:47:19.163712Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-02-16T22:47:19.163748Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-02-16T22:47:19.165210Z 0 [Note] InnoDB: Waiting for purge to start
2016-02-16T22:47:19.215586Z 0 [Note] InnoDB: 5.7.11 started; log sequence number 1210437
2016-02-16T22:47:19.216328Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-02-16T22:47:19.217459Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-02-16T22:47:19.217537Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160216 22:47:19
mysqld: Table 'mysql.plugin' doesn't exist
2016-02-16T22:47:19.217905Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-02-16T22:47:19.219399Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-02-16T22:47:19.219650Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-02-16T22:47:19.220055Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-02-16T22:47:19.220231Z 0 [Note] IPv6 is available.
2016-02-16T22:47:19.220261Z 0 [Note]   - '::' resolves to '::';
2016-02-16T22:47:19.220280Z 0 [Note] Server socket created on IP: '::'.
2016-02-16T22:47:19.233206Z 0 [Warning] Failed to open optimizer cost constant tables

2016-02-16T22:47:19.233439Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2016-02-16T22:47:19.233551Z 0 [ERROR] Aborting
但是,我无法运行mysql\u升级,因为mysqld没有运行。其他网站表示,数据文件的文件权限可能是一个问题,但它们都属于mysql(即,我认为是正确的)。我也尝试过安全运行mysqld_,但没有成功

有人能告诉我我做错了什么吗?

谢谢马克。 mysql_install_db无法工作(已弃用,然后建议的初始化失败)。但是,完全清洁并重新安装解决了问题。 作为参考,我执行的具体步骤如下:

yum remove mysql
rm -fr /usr/bin/mysql
rm -fr /var/lib/mysql
rm -fr /etc/my*
(reboot)
yum install mysql-community-{server,client,common,libs}-*
/sbin/service mysqld start
谢谢你,马克。 mysql_install_db无法工作(已弃用,然后建议的初始化失败)。但是,完全清洁并重新安装解决了问题。 作为参考,我执行的具体步骤如下:

yum remove mysql
rm -fr /usr/bin/mysql
rm -fr /var/lib/mysql
rm -fr /etc/my*
(reboot)
yum install mysql-community-{server,client,common,libs}-*
/sbin/service mysqld start

/var/lib/mysql
下的所有文件都属于
mysql
用户吗?您的文件系统是否已满?mysql的安装似乎不正确。您是否可以尝试卸载并重新安装或尝试运行mysql\u install\u db--user=mysql--basedir=/usr/--ldata=/var/lib/mysql/as rootyes,/var/lib/mysql下的所有内容都拥有所有权mysql:mysql,文件系统的每个分区上都有空间。您的输出中的这一行似乎提供了解决问题的提示:
2016-02-16T22:47:19.217905Z 0[错误]无法打开mysql.plugin表。请运行mysql\u升级来创建它。
mysql用户是否拥有
/var/lib/mysql
下的所有文件?您的文件系统是否已满?mysql的安装似乎不正确。您是否可以尝试卸载并重新安装或尝试运行mysql\u install\u db--user=mysql--basedir=/usr/--ldata=/var/lib/mysql/as rootyes,/var/lib/mysql下的所有内容都拥有所有权mysql:mysql,文件系统的每个分区上都有空间。您的输出中的这一行似乎提供了解决问题的提示:
2016-02-16T22:47:19.217905Z 0[错误]无法打开mysql.plugin表。请运行mysql\u升级来创建它。