Question

MySQL service unable to start...

Hi,

I’m getting an “Error establishing a database connection” in WordPress, and on further inspection it looks like the MySQL service isnt running.

When I try and run sudo service mysql start, I get:

Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.

If I run systemctl status mysql.service I get:

Loaded: loaded (/etc/init.d/mysql)
   Active: failed (Result: exit-code) since Mon 2019-06-03 09:00:20 UTC; 18s ago
  Process: 936 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

running sudo journalctl -xn gives me:

-- Logs begin at Mon 2019-06-03 08:58:05 UTC, end at Mon 2019-06-03 09:09:21 UTC. --
Jun 03 09:09:01 roofingsheetsbyrhino cron[509]: Authentication token is no longer valid; new one required
Jun 03 09:09:01 roofingsheetsbyrhino cron[509]: Authentication token is no longer valid; new one required
Jun 03 09:09:09 roofingsheetsbyrhino sshd[991]: Invalid user share123 from 106.12.24.108
Jun 03 09:09:09 roofingsheetsbyrhino sshd[991]: input_userauth_request: invalid user share123 [preauth]
Jun 03 09:09:09 roofingsheetsbyrhino sshd[991]: pam_unix(sshd:auth): check pass; user unknown
Jun 03 09:09:09 roofingsheetsbyrhino sshd[991]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=106.12.24.108
Jun 03 09:09:10 roofingsheetsbyrhino sshd[991]: Failed password for invalid user share123 from 106.12.24.108 port 55360 ssh2
Jun 03 09:09:11 roofingsheetsbyrhino sshd[991]: Received disconnect from 106.12.24.108: 11: Bye Bye [preauth]
Jun 03 09:09:21 roofingsheetsbyrhino sudo[993]: tom : TTY=pts/0 ; PWD=/var/www ; USER=root ; COMMAND=/bin/journalctl -xn
Jun 03 09:09:21 roofingsheetsbyrhino sudo[993]: pam_unix(sudo:session): session opened for user root by tom(uid=0)

I’m really not sure what the issue is here, or how this has come about - any advice as to what I should do next would be hugely appreciated!

Thanks!


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.

Embarrassingly, I just realised that the issue here was my backup plugin had piled up loads of backups rather than deleting the old ones… So the droplet had run out of disk space which was causing the issues.

So I’ve fixed the problem! Thanks for your help asciant!

all mysqld --help gives me is:

mysqld  Ver 10.0.27-MariaDB-0+deb8u1 for debian-linux-gnu on x86_64 ((Debian))
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Starts the MariaDB database server.

Usage: mysqld [OPTIONS]

For more help options (several pages), use mysqld --verbose --help.

Is this cause I am using MariaDB? Are the logs in a different place?

Thanks, all I see with sudo vi /var/log/mysql.log is:

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/var/log/mysql.log" 0L, 0C

I’m presuming this means an empty file?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.