mysql服务器重启后,终端登录mysql报错:Can't connect to local MySQL server through socket '/var/mysqld/mysql.sock''

因为并发问题,修改了mysql配置文件中的并发数参数max_connections之后重启mysql后,,使用mysql -uroot -p 登录mysql报错:

Can't connect to local MySQL server through socket '/var/mysqld/mysql.sock'';

查看错误日志后显示:如下:

190114 16:22:16 InnoDB: Could not open or create data files.
190114 16:22:16 InnoDB: If you tried to add new data files, and it failed here,
190114 16:22:16 InnoDB: you should now edit innodb_data_file_path in my.cnf back
190114 16:22:16 InnoDB: to what it was, and remove the new ibdata files InnoDB created
190114 16:22:16 InnoDB: in this failed attempt. InnoDB only wrote those files full of
190114 16:22:16 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
190114 16:22:16 InnoDB: remove old data files which contain your precious data!
190114 16:22:16 [ERROR] Plugin 'InnoDB' init function returned error.
190114 16:22:16 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190114 16:22:16 [ERROR] Unknown/unsupported storage engine: InnoDB
190114 16:22:16 [ERROR] Aborting

190114 16:22:16 [Note] /usr/sbin/mysqld: Shutdown complete

190114 16:22:16 mysqld_safe mysqld from pid file /var/mysqld/mysqld.pid ended
得知mysql没有启动成功,,但是使用ps aux |grep mysq* 查看后发现: 

原来是mysql进程没有关掉,,,执行kill 12223 后重新重启mysql后,就可以了.

你可能感兴趣的:(Mysql)