mysql启动错误排查

今天在Redhat7下面安装MySQL,接下来进行启动MySQL

启动结果如下:

[[email protected] log]# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service

Job for mysqld.service failed. See ‘systemctl status mysqld.service‘ and ‘journalctl -xn‘ for details.

那么我们遇到这样的错误就需要找MySQL启动日志,然后进行分析。

MySQL默认的日志路径是:

[[email protected] log]# pwd
/var/log

查看日志内容:

150806 20:57:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2015-08-06 20:57:06 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-06 20:57:06 0 [Note] /usr/sbin/mysqld (mysqld 5.6.26) starting as process 12043 ...
2015-08-06 20:57:06 12043 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2015-08-06 20:57:06 12043 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2015-08-06 20:57:06 12043 [Note] Plugin ‘FEDERATED‘ is disabled.
2015-08-06 20:57:06 12043 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-08-06 20:57:06 12043 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-06 20:57:06 12043 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-08-06 20:57:06 12043 [Note] InnoDB: Memory barrier is not used
2015-08-06 20:57:06 12043 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-06 20:57:06 12043 [Note] InnoDB: Using Linux native AIO
2015-08-06 20:57:06 12043 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-06 20:57:06 12043 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-06 20:57:06 12043 [Note] InnoDB: Completed initialization of buffer pool
2015-08-06 20:57:06 12043 [Note] InnoDB: Highest supported file format is Barracuda.
2015-08-06 20:57:06 12043 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-06 20:57:06 12043 [Note] InnoDB: Waiting for purge to start
2015-08-06 20:57:06 12043 [Note] InnoDB: 5.6.26 started; log sequence number 1600617
2015-08-06 20:57:06 12043 [ERROR] /usr/sbin/mysqld: unknown option ‘--rity risks‘ ##需额外注重ERROR级别的错误信息,此处显示的是未知的参数—rity risks
2015-08-06 20:57:06 12043 [ERROR] Aborting

2015-08-06 20:57:06 12043 [Note] Binlog end
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘partition‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘ARCHIVE‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘PERFORMANCE_SCHEMA‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_DATAFILES‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_TABLESPACES‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_FOREIGN_COLS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_FOREIGN‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_FIELDS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_COLUMNS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_INDEXES‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_TABLESTATS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_SYS_TABLES‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_FT_INDEX_TABLE‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_FT_INDEX_CACHE‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_FT_CONFIG‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_FT_BEING_DELETED‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_FT_DELETED‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_FT_DEFAULT_STOPWORD‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_METRICS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_BUFFER_POOL_STATS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_BUFFER_PAGE_LRU‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_BUFFER_PAGE‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_CMP_PER_INDEX_RESET‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_CMP_PER_INDEX‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_CMPMEM_RESET‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_CMPMEM‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_CMP_RESET‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_CMP‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_LOCK_WAITS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_LOCKS‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘INNODB_TRX‘
2015-08-06 20:57:06 12043 [Note] Shutting down plugin ‘InnoDB‘
2015-08-06 20:57:06 12043 [Note] InnoDB: FTS optimize thread exiting.
2015-08-06 20:57:06 12043 [Note] InnoDB: Starting shutdown...
2015-08-06 20:57:08 12043 [Note] InnoDB: Shutdown completed; log sequence number 1600627
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘BLACKHOLE‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘MyISAM‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘MEMORY‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘CSV‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘MRG_MYISAM‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘sha256_password‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘mysql_old_password‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘mysql_native_password‘
2015-08-06 20:57:08 12043 [Note] Shutting down plugin ‘binlog‘
2015-08-06 20:57:08 12043 [Note] /usr/sbin/mysqld: Shutdown complete

150806 20:57:09 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

根据日志信息分析,说是有一个参数错误,那么我们就可以进行参数配置检查

参数信息为:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted secu
rity risks
symbolic-links=0
character-set-server=utf8 #设置字符集为utf8
innodb_file_per_table=1 #让innodb的每个表文件单独存储
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

经检查发现有一个参数rity risk配置有误,由于参数配置直接从网络上拷贝,格式存在问题导致多了一个换行符,将其改为下面这样就好了。

# Disabling symbolic-links is recommended to prevent assorted security risks
时间: 2024-10-18 15:01:11

mysql启动错误排查的相关文章

解决Linux下MySQL启动错误Starting MySQL.Manager of pid-file quit without updating file.[FAILED]

刚装完MySQL,启动时报如下错误: Starting MySQL.Manager of pid-file quit without updating file.[FAILED] 依次尝试了从谷歌找到的各种方法,发现只要执行如下MySQL初始化命令即可解决: /usr/local/mysql/bin/mysql_install_db --user=mysql 下面附上从谷歌找到的解决此问题的方法集锦,也许每个人遇到的问题的原因会不一样,经供参考: 一.查看报错日志 报错日志是我们解决问题的方向灯

mysql启动错误解决

mysql 启动时,报错一般都不明显,因此我们需要配置错误日志 #vim /etc/my.cnf 在[mysqld]下添加 log_error = /var/log/mysql/error.log 再次启动时,如果出现错误,启动不起来,就可以去日志文件中,查看详细错误信息

Linux下Mysql启动异常排查方案

遇到Mysql启动异常问题,可以从以下几个方面依次进行问题排查: (1)如果遇到“Can't connect to local MySQL server through socket '/tmp/mysql.sock'”类似问题,查看Mysql配置文件(默认在/etc/my.cnf目录下),使用命令vi /etc/my.cnf,查看是否具备如下配置, [mysqld]port            = 3306socket       = /var/lib/mysql/mysql.sock 可能

mysql 启动错误1026

进入“事件查看器”“应用程序”果然发现很多MySql的错误Default storage engine (InnoDB) is not available 于是进入MySql的安装目录找到my.ini里有一句:default-storage-engine=INNODB改成MYISAM就可以了. 马上再去开启MySql服务就可以顺利开启了.

mysql启动错误与修复

昨天想着备份数据库,但是没有成功,错误原因是#Got errno 28 on write 查到是因为磁盘空间不足或者mysql设置中max_allowed_packet变量设置过小 在mysql命令行中使用#set global max_allowed_packet = 2*1024*1024*10.将其设置为20M 并且重新启动mysql命令行,再次备份,发现还是同样的错误,怀疑是磁盘空间满,经查看, [[email protected] bin]# df -hFilesystem Size

MySQL启动错误ERROR! MySQL server PID file could not be found的解决办法

/etc/init.d/mysql start无法启动mysql错误信息如下: ERROR! MySQL server PID file could not be found! Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/AYXXXXXXXXXXX.pid). 完整日志信息如下: 140902 18:11:33 mysqld_safe Starting mysqld

MySQL启动错误Starting MySQL.Manager of pid-file quit without updating file.

a 缺少库文件libstdc++.so.5 yum install libstdc* b selinux    iptables c 有残留数据  mysql-bin.index d 数据目录权限/data/mysql   所有者要是mysql e /etc/my.cnf没有指定datadir f mysql进程还在 g skip-federated  需要注释掉 h 错误日志目录不存在 cd /usr/local/mysql/bin ./mysql_safe 会提示 错误日志在哪里   美哟的

mysql启动错误处理

1.当启动MySQL时,报如下错误 [ERROR] Plugin 'InnoDB' init function returned error.[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.[ERROR] Unknown/unsupported storage engine: InnoDB 删除MySQL数据目录下的,然后重启MySQL rm -f ib_logfile*/etc/init.d/mysqld rest

MYSQL 启动错误193

  PHP开发环境搭建 一.工具\环境 WIN7旗舰版Service Pack1  64位 RS种子:http://rs.xidian.edu.cn/forum.php?mod=viewthread&tid=170364 VC14  即Visual studio 2015 URL:http://www.microsoft.com/en-us/download/details.aspx?id=48145 php-7.0.0-nts-Win32-VC14-x64 URL:http://windows