安装mysql5.7出现的问题

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_34770694/article/details/84936717
  1. 执行/usr/local/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data时,出现如下错误
2018-12-10 10:31:32 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2018-12-10 10:31:32 [ERROR]   Child process: /usr/local/mysql/bin/mysqldterminated prematurely with errno= 32
2018-12-10 10:31:32 [ERROR]   Failed to execute /usr/local/mysql/bin/mysqld --bootstrap --datadir=/usr/local/mysql/data --lc-messages-dir=/usr/local/mysql/share --lc-messages=en_US --basedir=/usr/local/mysql
-- server log begin --

-- server log end --

表明系统中没有该链接库,使用命令yum install libaio-devel.x86_64进行安装。

  1. 出现如下错误
Starting MySQL.2018-12-10T02:39:32.071467Z mysqld_safe error: log-error set to '/var/log/mariadb/mariadb.log', however file don't exists. Create writable for user 'mysql'.
The server quit without updating PID file (/var/lib/mysql/i[FAILED]4czny0ed1pe9hz.pid).

此为文件权限问题
一次执行如下命令

# mkdir /var/log/mariadb
# touch /var/log/mariadb/mariadb.log
# chown -R mysql:mysql /var/log/mariadb/
  1. 出现如下错误
Starting MySQL.2018-12-10T02:42:01.619794Z mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.
The server quit without updating PID file (/var/lib/mysql/i[FAILED]4czny0ed1pe9hz.pid).

查看/etc目录下是否存在文件my.cnf

ll /etc/ |grep my

存在则将该文件重命名下

mv /etc/my.cnf /etc/my.cnf.bak

再次启动service mysql start就成功了

展开阅读全文

[求助]centos7.0安装mysql5.7问题

09-27

系统:centos7.0rnmysql版本:5.7rn安装方式为rpm包rn日志如下 :rnrnrn2016-09-27T02:21:35.212847Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysqlrn2016-09-27T02:21:35.403053Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).rn2016-09-27T02:21:35.403137Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.rn2016-09-27T02:21:35.403141Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.rn2016-09-27T02:21:35.404396Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.14) starting as process 14743 ...rn2016-09-27T02:21:35.408561Z 0 [Note] InnoDB: PUNCH HOLE support availablern2016-09-27T02:21:35.408598Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtinsrn2016-09-27T02:21:35.408609Z 0 [Note] InnoDB: Uses event mutexesrn2016-09-27T02:21:35.408616Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrierrn2016-09-27T02:21:35.408623Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3rn2016-09-27T02:21:35.408627Z 0 [Note] InnoDB: Using Linux native AIOrn2016-09-27T02:21:35.408887Z 0 [Note] InnoDB: Number of pools: 1rn2016-09-27T02:21:35.408994Z 0 [Note] InnoDB: Using CPU crc32 instructionsrn2016-09-27T02:21:35.410451Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128Mrn2016-09-27T02:21:35.420463Z 0 [Note] InnoDB: Completed initialization of buffer poolrn2016-09-27T02:21:35.422718Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().rn2016-09-27T02:21:35.434466Z 0 [Note] InnoDB: Highest supported file format is Barracuda.rn2016-09-27T02:21:35.445292Z 0 [Note] InnoDB: Creating shared tablespace for temporary tablesrn2016-09-27T02:21:35.445356Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...rn2016-09-27T02:21:35.664240Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.rn2016-09-27T02:21:35.665174Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.rn2016-09-27T02:21:35.665188Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.rn2016-09-27T02:21:35.666057Z 0 [Note] InnoDB: 5.7.14 started; log sequence number 1210151rn2016-09-27T02:21:35.666267Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_poolrn2016-09-27T02:21:35.666494Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160927 10:21:35rn2016-09-27T02:21:35.666511Z 0 [Note] Plugin 'FEDERATED' is disabled.rnmysqld: Table 'mysql.plugin' doesn't existrn2016-09-27T02:21:35.666633Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.rn2016-09-27T02:21:35.667103Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.rn2016-09-27T02:21:35.667184Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private keyrn2016-09-27T02:21:35.667604Z 0 [Note] Server hostname (bind-address): '*'; port: 3306rn2016-09-27T02:21:35.667643Z 0 [Note] IPv6 is available.rn2016-09-27T02:21:35.667652Z 0 [Note] - '::' resolves to '::';rn2016-09-27T02:21:35.667673Z 0 [Note] Server socket created on IP: '::'.rn2016-09-27T02:21:35.670104Z 0 [Warning] Failed to open optimizer cost constant tablesrnrn2016-09-27T02:21:35.670226Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't existrn2016-09-27T02:21:35.670270Z 0 [ERROR] Abortingrnrn2016-09-27T02:21:35.670282Z 0 [Note] Binlog endrn2016-09-27T02:21:35.670375Z 0 [Note] Shutting down plugin 'ngram'rn2016-09-27T02:21:35.670384Z 0 [Note] Shutting down plugin 'ARCHIVE'rn2016-09-27T02:21:35.670387Z 0 [Note] Shutting down plugin 'partition' 论坛

没有更多推荐了,返回首页