Question

Database Error when logging into wordpress

I can access my website but can’t log into my wordpress website. When I do that I get Database error. I tried doing repairing database but it still showed my database error.

I don’t know what happened but I haven’t changed anything since last week.

I have also tried restarting mysql using and this was the output:

~# sudo service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

Then I ran both command for details

~# systemct1 status mysql.service

Command 'systemct1' not found, did you mean:

  command 'systemctl' from deb systemd (245.4-4ubuntu3.17)
  command 'systemctl' from deb systemctl (1.4.3424-2)

Try: apt install <deb name>
un 02 19:02:35 database-name sshd[2433]: Failed password for root from 61.177.172.124 port 16909 ssh2
Jun 02 19:02:37 database-name sshd[2435]: Failed password for invalid user assem from 181.28.152.134 port 44754 ssh2
Jun 02 19:02:37 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:38 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:38 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:38 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:39 database-name sshd[2433]: Failed password for root from 61.177.172.124 port 16909 ssh2
Jun 02 19:02:40 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:40 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:40 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:41 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:42 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.225.136 DST=my-ip-address>
Jun 02 19:02:42 database-name sshd[2433]: Failed password for root from 61.177.172.124 port 16909 ssh2
Jun 02 19:02:44 database-name sshd[2433]: Received disconnect from 61.177.172.124 port 16909:11:  [preauth]
Jun 02 19:02:44 database-name sshd[2433]: Disconnected from authenticating user root 61.177.172.124 port 16909 [preauth]
Jun 02 19:02:44 database-name sshd[2433]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.172.124  user=root
Jun 02 19:02:47 database-name sshd[2442]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.172.124 >
Jun 02 19:02:49 database-name sshd[2442]: Failed password for root from 61.177.172.124 port 19411 ssh2
Jun 02 19:02:51 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=192.241.222.168 DST=137.184.129.>
Jun 02 19:03:04 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=185.156.74.58 DST=my-ip-address>
Jun 02 19:03:12 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=123.195.71.106 DST=137.184.129.2>
Jun 02 19:03:19 database-name sshd[2449]: Invalid user ems from 59.103.236.31 port 22559
Jun 02 19:03:19 database-name sshd[2449]: pam_unix(sshd:auth): check pass; user unknown
Jun 02 19:03:19 database-name sshd[2449]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.103.236.31
Jun 02 19:03:21 database-name sshd[2449]: Failed password for invalid user ems from 59.103.236.31 port 22559 ssh2
Jun 02 19:03:23 database-name sshd[2449]: Received disconnect from 59.103.236.31 port 22559:11: Bye Bye [preauth]
Jun 02 19:03:23 database-name sshd[2449]: Disconnected from invalid user ems 59.103.236.31 port 22559 [preauth]
Jun 02 19:03:26 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=71.6.232.8 DST=my-ip-address L>
Jun 02 19:03:40 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=222.103.167.144 DST=137.184.129.>
Jun 02 19:04:02 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:03 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:04 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:04 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:05 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:05 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:06 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=136.185.75.237 DST=137.184.129.2>
Jun 02 19:04:06 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=2.147.60.179 DST=my-ip-address>
Jun 02 19:04:37 database-name kernel: [UFW BLOCK] IN=eth0 OUT= MAC=9e:b4:bd:34:f5:51:fe:00:00:00:01:01:08:00 SRC=183.136.225.42 DST=137.184.129.2>
Jun 02 19:04:41 database-name sshd[2453]: Invalid user cinzia from 59.103.236.31 port 36167
Jun 02 19:04:41 database-name sshd[2453]: pam_unix(sshd:auth): check pass; user unknown
Jun 02 19:04:41 database-name sshd[2453]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.103.236.31
Jun 02 19:04:43 database-name sshd[2453]: Failed password for invalid user cinzia from 59.103.236.31 port 36167 ssh2

Now I don’t know what to do. Please help me out


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello there,

You can check our tutorial on How To Troubleshoot Issues in MySQL

https://www.digitalocean.com/community/tutorial_series/how-to-troubleshoot-issues-in-mysql

As already mentioned you can examine the MySQL error log to find more detailed information about the issue.

You can execute the following command and search for any error reference in the log.

  1. sudo less /var/log/mysql/error.log

Hope that this helps!

Hi @mohitpandey,

It seems there is a problem with the whole MySQL instance as it can’t start at all. You’ve tried to use

  1. ~# systemct1 status mysql.service

however there is a typo. You need to change systemct1 to systemctl. So it will be

  1. # systemctl status mysql.service

Alternatively, you can check your MySQL error log and see the exact error. Once you have it, let me know and I’ll further assist with it.