MySQL Job failed to start

后端 未结 13 1832
离开以前
离开以前 2021-01-30 14:40

I\'m on Kubuntu 12.04, and after installing mysql via an apt-get (mysql ver: 5.5.35), i\'m trying to start mysql service, but I got this error:

sudo servi

相关标签:
13条回答
  • 2021-01-30 15:15

    Reinstallation will works because it will reset all the value to default. It is better to find what the real culprits (my.cnf editing mistake does happens, e.g. bad/outdated parameter suggestion during mysql tuning.)

    Here is the mysql diagnosis if you suspect some value is wrong inside my.cnf : Run the mysqld to show you the results.

    sudo -u mysql  mysqld 
    

    Afterwards, fix all the my.cnf key error that pop out from the screen until mysqld startup successfully.

    Then restart it using

    sudo service mysql restart
    
    0 讨论(0)
  • 2021-01-30 15:19

    In my case:

    • restart server
    • restart mysql
    • create .socket in directory
    0 讨论(0)
  • 2021-01-30 15:21

    In most cases, just purging the mysql-server package and re-installing it will do the job.

    Run,

    sudo apt-get purge mysql-server-5.1 mysql-common

    followed by

    sudo apt-get install mysql-server

    0 讨论(0)
  • 2021-01-30 15:22

    Check the file permissions, if edited

    Fail:

    $ sudo chmod 776 /etc/mysql/my.cnf
    $ sudo service mysql restart
    mysql stop/waiting
    start: Job failed to start
    

    Ok:

    $ sudo chmod 774 /etc/mysql/my.cnf
    $ sudo service mysql restart
    stop: Unknown instance:
    mysql start/running, process 9564
    
    0 讨论(0)
  • 2021-01-30 15:24

    The given solution requires enough free HDD, the actual problem was the HDD memory shortage. So If you don't have an alternative server or free disk space, you need some other alternative.

    I faced this error with my production server (Linode VPS) when I was running a bulk download into MySQL. Its not a proper solution but VERY QUICK FIX, which we often need in production to bring things UP FAST.

    1. Resize our VPS Server to higher Hard Disk size
    2. Start MySQL, it works.
    3. Login to your MySQL instance and make appropriate adjustments that caused this error (e.g. remove some records, table, or take DB backup to your local machine that are not required at production, etc. After all you know, what caused this issue.)
    4. Downgrade your VPS Server to previous package you was already using
    0 讨论(0)
  • 2021-01-30 15:25

    In my case, i do:

    1. sudo nano /etc/mysql/my.cnf
    2. search for bind names and IPs
    3. remove the specific, and let only localhost 127.0.0.1 and the hostname
    0 讨论(0)
提交回复
热议问题