[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed

Discussion in 'ISPConfig 3 Priority Support' started by livetv, Dec 31, 2014.

  1. livetv

    livetv Member

    Hello,
    i have made command mistake when upgrading php and i harmed mysql.
    i tried to reinstall mysql with command :
    apt-get purge mysql-server mysql-common mysql-client
    rm -rf /var/lib/mysql
    rm -rf /etc/mysql*

    and than
    apt-get install mysql-server mysql-common mysql-client
    apt-get update
    apt-get upgrade

    but getting [FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed

    i have made backups of /etc/mysql & /var/lib/mysql & /var/lib/mysql.bak
    my
    /var/log/mysql/mysql.log is empty


    Thank you
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Mysql is writing startup errir into /var/log/syslog. Please check which errors are logged there.
     
  3. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Check the permissions for /var/log/mysql and make sure that you defined general_log_file or log-error in your my.cnf.
    You can also try to start mysql manually with
    Code:
    /usr/bin/mysqld_safe
    to see what´s going wrong.
     
  4. livetv

    livetv Member

    my /var/log/syslog
    https://docs.google.com/document/d/19k01sPR4z8FVT6XoprzfqTDcEkf6_EwrW1Q13_05kJ0/edit?usp=sharing

    tried -
    /usr/bin/mysqld_safe
    141231 16:03:48 mysqld_safe Logging to '/var/lib/mysql/vps-265655-16121.manage.myhosting.com.err'.
    141231 16:03:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    141231 16:03:48 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    [email protected]:~#
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    please post the output of:

    ls -la /var/lib/mysql
     
  6. livetv

    livetv Member

    ls -la /var/lib/mysql
    total 316100
    drwx------ 28 mysql mysql 4096 Dec 31 16:04 .
    drwxr-xr-x 51 root root 4096 Dec 31 14:35 ..
    drwx------ 2 root root 4096 Oct 13 02:46 c1aps1
    drwx------ 2 root root 16384 Sep 25 15:08 c1arabOpenCart_1
    drwx------ 2 root root 4096 Sep 19 21:45 c1DrupalCore
    drwx------ 2 root root 4096 Sep 20 01:46 c1Drupal_local
    drwx------ 2 root root 24576 Sep 4 12:37 c1moodleJIM
    drwxr-xr-x 2 root root 24576 Sep 4 20:00 c1moodleJIM888
    drwx------ 2 root root 24576 Dec 9 07:23 c1OC_2_0_0_RTL
    drwx------ 2 root root 24576 Nov 23 02:10 c1opencart2
    drwx------ 2 root root 16384 Sep 22 23:06 c1opencartarab
    drwx------ 2 root root 24576 Oct 1 03:07 c1Opencart_My
    drwx------ 2 root root 4096 May 19 2014 c1SpywareAds
    drwx------ 2 root root 4096 Sep 13 15:59 c2moodle
    drwx------ 2 root root 24576 Dec 14 15:12 c2moodle1
    drwx------ 2 root root 24576 Jun 3 2014 c2MyMoodle
    drwx------ 2 root root 12288 May 20 2014 dbispconfig
    -rw-r--r-- 1 root root 0 May 15 2014 debian-5.1.flag
    -rw-rw---- 1 root root 312475648 Dec 22 02:14 ibdata1
    -rw-rw---- 1 root root 5242880 Dec 22 02:14 ib_logfile0
    -rw-rw---- 1 root root 5242880 Dec 15 19:51 ib_logfile1
    drwx------ 2 root root 24576 May 19 2014 moodlecantlog
    drwx------ 2 root root 24576 May 19 2014 moodledontknow
    drwx------ 2 root root 24576 May 26 2014 moodle_jimbackup
    drwx------ 2 root root 24576 May 26 2014 [email protected]
    drwx------ 2 mysql root 4096 Dec 31 14:40 mysql
    -rw------- 1 root root 6 May 15 2014 mysql_upgrade_info
    drwx------ 2 root root 4096 Nov 5 00:11 [email protected]@[email protected]
    drwx------ 2 root root 4096 Nov 29 00:37 openmeetings
    drwx------ 2 root root 4096 Sep 14 14:26 [email protected]@002e2
    drwx------ 2 root root 4096 Sep 14 16:12 [email protected]@[email protected]
    drwx------ 2 root root 4096 Oct 19 04:00 [email protected]@[email protected]
    drwx------ 2 root root 4096 Sep 13 15:14 phpmyadmin
    -rw-r----- 1 mysql root 8772 Dec 31 16:04 vps-1130913-16121.manage.myhosting.com.err
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run:

    chown -R mysql:mysql /var/lib/mysql

    and try to start mysql again.
     
  8. livetv

    livetv Member

    chown -R mysql:mysql /var/lib/mysql
    [email protected]:~# /etc/init.d/mysql start
    [ ok ] Starting MySQL database server: mysqld.
    [info] Checking for corrupt, not cleanly closed and upgrade needing tables..
    [email protected]:~# ERROR 1548 (HY000) at line 1: Cannot load from mysql.proc. The table is probably corrupted
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check if mysql is running, even with this error. e.g. by trying to login to phpmyadmin. If its working, go to the mysql database in phpmyadmin, select all tables and choose repair option.
     
  10. livetv

    livetv Member

    phpmyadmin - ERROR 404 - Not Found!
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe phpmyadmin got uninstalled while you removed mysql. Try to reinstall it.

    Or you can try to login with the mysql command on the shell:

    mysql -u root -p
     
  12. livetv

    livetv Member

    installed phpmyadmin and repair mysql tabels
    Your SQL query has been executed successfully

    but cant log to any of my sites
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Are the mysql users of the website databases listed in the user table of the mysql database?
     
  14. livetv

    livetv Member

    according to your post i noticed that in phpmyadmin in mysql tables i get message:
    mysql.general_log optimize note The storage engine for the table doesn't support o...
    mysql.slow_log optimize note The storage engine for the table doesn't support o...


    and when tried to log to mysql:
    mysql -u root -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
     
  15. livetv

    livetv Member

    localhost root *56231E4D1C51E43B6A0EC5E5ED62D4A270F70A33 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y [BLOB - 0B] [BLOB - 0B] [BLOB - 0B] 0 0 0 0 NULL
    [​IMG] [​IMG] vps-265655-16121.manage.myhosting.com root *56231E4D1C51E43B6A0EC5E5ED62D4A270F70A33 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y [BLOB - 0B] [BLOB - 0B] [BLOB - 0B] 0 0 0 0 NULL
    [​IMG] [​IMG] 127.0.0.1 root *56231E4D1C51E43B6A0EC5E5ED62D4A270F70A33 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y [BLOB - 0B] [BLOB - 0B] [BLOB - 0B] 0 0 0 0 NULL
    [​IMG] [​IMG] localhost debian-sys-maint *639D263019D781E4460B0511F894518F17E893B0 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N [BLOB - 0B] [BLOB - 0B] [BLOB - 0B] 0 0 0 0 NULL
    [​IMG] [​IMG] localhost openmeetings *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N [BLOB - 0B] [BLOB - 0B] [BLOB - 0B] 0 0 0 0 NULL
    [​IMG] [​IMG] localhost phpmyadmin *CC67043C7BCFF5EEA5566BD9B1F3C74FD9A5CF5D N N N N N N N N N N N N N N N N N N N N N N N N N N N N N [BLOB - 0B] [BLOB - 0B] [BLOB - 0B] 0 0 0 0 NULL
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the website database users are missing. Please login to ispconfig, go to tools > resnc and run a resync on the database users.
     
  17. livetv

    livetv Member

    Resync Tool / Resync shell users / start

    what i should do now as i still cant log to mysql

     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    But you can use phpmyadmin? phpmyadmin logs into mysql as well, so the login must be possible. Maybe you just use a wrong password? Try to use the same password for the mysql command that you use for phpmyadmin login.
     
  19. livetv

    livetv Member

    you right Sir, i used the phpmyadmin password and it is working.
    in my ispconfig i have 2 domain name, one of them work o.k but the second domain all database are not running
    what could be the problem?

    Thank you
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Are the databases visible in phpmyadmin? Can you access the databases in phpmyadmin as root and run a repair n these databases?
     

Share This Page