【问题标题】:mysql service can't restartmysql服务无法重启
【发布时间】:2018-07-12 14:18:53
【问题描述】:

我尝试使用sudo /etc/init.d/mysql start启动mysql, 以及使用sudo restart mysqlsudo /etc/init.d/mysql restart 重新启动,但没有任何反应。当我尝试这些类型的命令时,apache和php都很好,但是我总是用mysql出现问题,我不明白。它工作了一段时间,然后就关闭了。

如果我重新安装它的所有软件包,它可以工作,但我不想经常处理它。

使用systemctl status mysql.service 我得到:

mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor 
preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-07-12 16:06:18 CEST; 
7min ago
Process: 9231 ExecStart=/usr/sbin/mysqld --daemonize --pid- 
file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Process: 9222 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre 
(code=exited, status=0/SUCCESS)

有人可以帮助我吗?我是新手。我有 Ubuntu 18.04。

【问题讨论】:

    标签: mysql service lamp restart


    【解决方案1】:
    ## 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

    【讨论】:

    • 我明白了这个/etc/mysql/my.cnf: editing symbolic links is not permitted。如果我在 mysql.cnf 中这样做是一样的吗?我应该把它放在这个## MySQL 数据库服务器配置文件下。 :((
    猜你喜欢
    • 1970-01-01
    • 2017-05-23
    • 1970-01-01
    • 1970-01-01
    • 2014-04-23
    • 1970-01-01
    • 2013-12-08
    • 2021-10-18
    • 2021-10-24
    相关资源
    最近更新 更多