CentOS 7 安装MySQL 5.6遇到问题及解决方案(2)

  [root@azrlnx06 jirasetup]# rpm -ivh MySQL-server-advanced-5.6.20-1.rhel5.x86_64.rpm Preparing...                          ################################# [100%] Updating / installing...   1:MySQL-server-advanced-5.6.20-1.rh################################# [100%] FATAL ERROR: please install the following Perl modules before executing /usr/bin/mysql_install_db: Data::Dumper [root@azrlnx06 jirasetup]#

使用yum安装了 perl perl-devel相关包(注意:此处安装MySQL时,没有输出安装相关Detail的信息,是因为Perl相关模组没有安装的缘故,此处还漏掉了安装perl-Data-Dumper

[root@azrlnx06 jirasetup]# yum install -y perl perl-devel

安装完Perl相关组件后,重新安装MySQL,如下所示,安装成功,但是没有输出安装相关Detail的信息(因为没有安装perl-Data-Dumper),启动MySQL报错

root@azrlnx06 jirasetup]# rpm -ivh MySQL-server-advanced-5.6.20-1.rhel5.x86_64.rpm Preparing...                          ################################# [100%] Updating / installing...   1:MySQL-server-advanced-5.6.20-1.rh################################# [100%] [root@azrlnx06 jirasetup]# rpm -ivh MySQL-client-advanced-5.6.20-1.rhel5.x86_64.rpm Preparing...                          ################################# [100%] Updating / installing...   1:MySQL-client-advanced-5.6.20-1.rh################################# [100%] [root@azrlnx06 ~]# service mysql start Starting MySQL............. ERROR! The server quit without updating PID file (/var/lib/mysql/azrlnx06.pid). [root@azrlnx06 ~]#

找到MySQL的错误日志,然后检查/var/lib/mysql/azrlnx06.err错误日志,发现如下错误信息:

[root@azrlnx06 mysql]# find / -name *.err /var/lib/mysql/azrlnx06.err /var/log/azure/Microsoft.OSTCExtensions.LinuxDiagnostic/2.3.9011/mdsd.err /var/log/azure/Microsoft.OSTCExtensions.LinuxDiagnostic/2.3.9013/mdsd.err /var/log/mdsd/mdsd.err   [root@azrlnx06 mysql]# more /var/lib/mysql/azrlnx06.err 161111 03:28:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2016-11-11 03:28:25 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-11-11 03:28:25 2144 [Note] Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist 2016-11-11 03:28:25 2144 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2016-11-11 03:28:25 2144 [Note] InnoDB: Using atomics to ref count buffer pool pages 2016-11-11 03:28:25 2144 [Note] InnoDB: The InnoDB memory heap is disabled 2016-11-11 03:28:25 2144 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-11-11 03:28:25 2144 [Note] InnoDB: Memory barrier is not used 2016-11-11 03:28:25 2144 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-11-11 03:28:25 2144 [Note] InnoDB: Using Linux native AIO 2016-11-11 03:28:25 2144 [Note] InnoDB: Using CPU crc32 instructions 2016-11-11 03:28:25 2144 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2016-11-11 03:28:25 2144 [Note] InnoDB: Completed initialization of buffer pool 2016-11-11 03:28:25 2144 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 2016-11-11 03:28:25 2144 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2016-11-11 03:28:25 2144 [Note] InnoDB: Database physically writes the file full: wait... 2016-11-11 03:28:26 2144 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2016-11-11 03:28:31 2144 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2016-11-11 03:28:37 2144 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2016-11-11 03:28:37 2144 [Warning] InnoDB: New log files created, LSN=45781 2016-11-11 03:28:37 2144 [Note] InnoDB: Doublewrite buffer not found: creating new 2016-11-11 03:28:37 2144 [Note] InnoDB: Doublewrite buffer created 2016-11-11 03:28:37 2144 [Note] InnoDB: 128 rollback segment(s) are active. 2016-11-11 03:28:37 2144 [Warning] InnoDB: Creating foreign key constraint system tables. 2016-11-11 03:28:37 2144 [Note] InnoDB: Foreign key constraint system tables created 2016-11-11 03:28:37 2144 [Note] InnoDB: Creating tablespace and datafile system tables. 2016-11-11 03:28:38 2144 [Note] InnoDB: Tablespace and datafile system tables created. 2016-11-11 03:28:38 2144 [Note] InnoDB: Waiting for purge to start 2016-11-11 03:28:38 2144 [Note] InnoDB: 5.6.20 started; log sequence number 0 2016-11-11 03:28:38 2144 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ef3b0cd5-a7be-11e6-98b3-000d3a8062fe. 2016-11-11 03:28:38 2144 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work. 2016-11-11 03:28:38 2144 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work. 2016-11-11 03:28:38 2144 [Note] Server hostname (bind-address): '*'; port: 3306 2016-11-11 03:28:38 2144 [Note] IPv6 is available. 2016-11-11 03:28:38 2144 [Note]  - '::' resolves to '::'; 2016-11-11 03:28:38 2144 [Note] Server socket created on IP: '::'. 2016-11-11 03:28:38 2144 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 161111 03:28:38 mysqld_safe mysqld from pid file /var/lib/mysql/azrlnx06.pid ended

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6f92d9c00915ee9d6c48d85e5ab45c32.html