6890e40556ba7e589b7fc95aeb0009f5a5464909
By:
david26

my database crashed all my websites down except simple html sites

January 8, 2015 1.5k views

hello geeks :( , i have a big problem when i was transferring my wordpress from my old webhosting to digitalacean vps(centos6.5) , and exactely when i change (wp-config.php) to the new database ,Suddenly my databade was down and all my websites are down except the simple html websites are working , my zpanel down ,i try all commands to repair mysql from ssh console but nothing happened.I will be very appreciate to assist me.

[abdelkrim26@chirmark ~]$ /etc/init.d/mysqld restart 
Stopping mysqld: [ OK ] 
Starting mysqld: [FAILED] 
[abdelkrim26@chirmark ~]$ sudo tail -50 /var/log/mysqld/error.log 
[sudo] password for abdelkrim26: 
tail: cannot open `/var/log/mysqld/error.log' for reading: No such file or directory
[abdelkrim26@chirmark ~]$ /etc/mysql/my.cnf 
-bash: /etc/mysql/my.cnf: No such file or directory 
[abdelkrim26@chirmark ~]$ /etc/my.cnf 
-bash: /etc/my.cnf: Permission denied 
[abdelkrim26@chirmark ~]$ /etc/my.cnf ~/.my.cnf 
-bash: /etc/my.cnf: Permission denied 
[abdelkrim26@chirmark ~]$ /etc/mysql/my.cnf 
-bash: /etc/mysql/my.cnf: No such file or directory 
[abdelkrim26@chirmark ~]$ grep "log_error" /etc/mysql/my.cnf 
grep: /etc/mysql/my.cnf: No such file or directory 
[abdelkrim26@chirmark ~]$ grep "log_error" /etc/my.cnf 
[abdelkrim26@chirmark ~]$ grep "log_error" /etc/mysql/my.cnf 
grep: /etc/mysql/my.cnf: No such file or directory 
[abdelkrim26@chirmark ~]$ /var/log/mysql/error.log 
-bash: /var/log/mysql/error.log: No such file or directory 
[abdelkrim26@chirmark ~]$ sudo tail -50 /var/log/mysql/error.log 
[sudo] password for abdelkrim26: 
tail: cannot open `/var/log/mysql/error.log' for reading: No such file or directory 
[abdelkrim26@chirmark ~]$ /etc/init.d/mysqld r 
Usage: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload}************ 
[abdelkrim26@chirmark ~]$ /etc/init.d/mysqld a 
Usage: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload} 
[abdelkrim26@chirmark ~]$ /etc/init.d/mysqld f 
Usage: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload} 
[abdelkrim26@chirmark ~]$ /etc/init.d/mysqld stop 
Stopping mysqld: [ OK ] 
[abdelkrim26@chirmark ~]$ /etc/init.d/mysqld start 
Starting mysqld: [FAILED] 
3 comments
  • I'm not as familiar with CentOS, so here are some generic diagnostics to start with

    1. Use ps to see if the server is still running and any arguments passed to it

       ps -ef | grep mysql
      
    2. Determine other parameters that are being used to start mysql

      my_print_defaults mysqld_safe
      ###  that should print out where your log file is located
      
      my_print_defaults --mysqld
      ### or ###
      my_print_defaults mysqld
      ####  info on data directory location and the socket the database uses
      
  • Is your mySQL configured to use innoDB or Myisam as main engine?
    Try to "su" and see if you can open /etc/my.cnf with vi, nano or whatever you use.

  • run this, and give us the output:

    log_file=$(cat /etc/my.cnf|grep "log-error"|cut -d '=' -f2); tail -200 $log_file
    
Be the first one to answer this question.