我尝试使用sudo /etc/init.d/mysql start
启动mysql,也尝试使用sudo restart mysql
和sudo /etc/init.d/mysql restart
重启,但没有任何反应。当我尝试这些类型的命令时,apache和php都很好,但是我总是遇到mysql的问题,我不明白。它在一段时间内工作良好,然后就关闭。
如果我重新安装它的所有包,它可以工作,但我不想不断地处理它。
使用systemctl status mysql.service
我得到:
mysql.service - MySQL社区服务器已加载:已加载(/lib/systemd/system/mysql.service;已启用;厂商预设:已启用) Active:清华2018-07-12 16:06:18以来失败(结果:退出代码);7分钟前进程:9231execstart=/usr/sbin/mysqld --daemonize --pid- MySQL=/run/mysqld/mysqld.pid (code=exited,status=1/FAILURE)进程: 9222 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited,状态=0/成功)
有人能帮帮我吗?我是个新手。我有Ubuntu 18.04。
发布于 2018-07-12 23:19:17
## Edit /etc/my.cnf, and add the following line under the
[mysqld] heading.
[mysqld]
innodb_buffer_pool_size=64M
Then restart: $ service mysql restart
https://www.digitalocean.com/community/questions/mysql-on-ubuntu-keeps-crashing
https://stackoverflow.com/questions/51308029
复制相似问题