0

I was working on my wordpress website and changed file permissions in Filezilla in order to upload a file. Shortly after that, the database seemed to have crashed.

I can no longer log into the mysql server via SSH. I get the following error when trying to restart the server:

Failed to restart mysqld.service: Unit mysqld.service not found.

I already tried the following:

sudo chmod -R 755 /var/lib/mysql

But no result.

If I try to log into phpmyadmin it give me the following error:

 #2002 - No such file or directory<br />The server is not responding (or the local server's socket is not correctly configured).

I have changed the file permissions back to the original (755) but it's still not working.

  • Have you check are their any files inside that folder? – Ahmed Khan Mar 17 '17 at 11:34
  • Yes the following files are in /var/lib/mysql: auto.cnf debian-5.7.flag ib_buffer_pool ibdata1 ib_logfile0 ib_logfile1 ibtmp1 mysql performance_schema phpmyadmin sys wholesale wordpress – DidgeriDude Mar 17 '17 at 11:37
  • Try this command to restart mysql `service mysql restart` – Ahmed Khan Mar 17 '17 at 11:42
  • Doing that gives the following: `Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.` systemctl status gives a status=1/FAILURE at process: ` Process: 31380 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)` – DidgeriDude Mar 17 '17 at 11:48
  • try starting your mysql – Ahmed Khan Mar 17 '17 at 11:49
  • Trying to start it gives the following error: `ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)` – DidgeriDude Mar 17 '17 at 11:53
  • try the solution of this question: http://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run – Ahmed Khan Mar 17 '17 at 11:55
  • That did not work. The server was working fine before, but it seems that changing the file permissions in FileZilla messed something up – DidgeriDude Mar 17 '17 at 11:59
  • What do you get when you do a ps aux | grep mysql? – Daniel May 14 '17 at 02:03

0 Answers0