MySQL error, can no longer login as root

1

So I updated my MySQL and PHPMyAdmin yesterday and ever since then I cannot login to MySQL as root or any other username I have. I tried both phpmyadmin and the terminal and still cannot get in. How do I reset the password?Terminal

enter image description here

user02103012

Posted 2016-06-21T14:46:31.023

Reputation: 25

1Your server is down. Start it. – gronostaj – 2016-06-21T14:47:54.127

It's not down. I'm able to access the web interface of the server (it's a Synology server) and I can ssh into it too. – user02103012 – 2016-06-21T14:49:19.680

you either need to reboot the machine to start the service automatically or go to the services snapin, or start with the cmd prompt if you can get to them. otherwise you need to contact your administrator (if that's you, youre up the creek without a paddle) – Simon Price – 2016-06-21T14:56:11.637

2your mysql server, not your web server or ssh daemon – Tom Yan – 2016-06-21T14:56:37.623

Tried /etc/init.d/mysqld restart and service mysqld restart both did not work, any other ways to restart from terminal you can recommend? – user02103012 – 2016-06-21T15:06:21.357

You should probably check your mysqld logs (probably in /var/log/mysql) to see what's stopping it from starting – Tom Yan – 2016-06-21T15:10:24.530

oh man, there's no mysqld log in /var/log/mysql. Also @Simon I'm up poop creek here in that case. – user02103012 – 2016-06-21T15:35:11.097

Can you try starting it by hand, like running /usr/bin/mysqld_safe by hand, or trying to reconstruct the command line from /etc/init.d/mysqld to run it and see if you get errors that way? – Eric Renouf – 2016-06-21T16:18:36.387

Just typing in "mysqld" on its own gives this: 160621 11:45:31 [Note] mysqld (mysqld 5.5.49-MariaDB) starting as process 16974 ... 160621 11:45:31 [ERROR] Fatal error: Please consult the Knowledge Base to find out how to run mysqld as root!

160621 11:45:31 [ERROR] Aborting

`160621 11:45:31 [Note] mysqld: Shutdown complete`
 – user02103012  – 2016-06-21T16:46:01.397

Ok, isolated the problem somewhat. A co-worker just told me they tried to import a db over the weekend via a script and was logged in as root; the import failed part of the way through due to her machine being on wifi and lost access to the db. Now they are also unable to login with the same error message. Don't know if this related to the current problem. – user02103012 – 2016-06-21T17:28:36.600

Ok, I managed to restart the mysql, but got another error as it was taking a while to shutdown: ERROR! Failed to stop running server, so refusing to try to start.

Any ideas on what to try next? I'll be googling around in the meantime. Thanks for the help so far everyone. – user02103012 – 2016-06-21T18:05:30.210

Talked to a support team. They will be going through debug logs to see what broke the login access. They also asked if I could get a log of the user's shell commands when they ssh'd up to the server to import the DB to isolate the problem. It's not built-in, according to this: https://administratosphere.wordpress.com/2011/05/20/logging-every-shell-command/

– user02103012 – 2016-06-21T18:52:26.077

which version of mysql & OS are you having ? – Mongrel – 2016-06-24T05:53:13.507

@Mongrel MySQL version 5.5.49-0065, OS is x64 Linux, specifically x86_64 GNU/Linux synology_cedarview_1813+ – user02103012 – 2016-06-24T16:33:49.133

Update: I will need to uninstall/reinstall MySQL to fix this. Do my databases also get deleted in the process? – user02103012 – 2016-06-24T16:39:21.163

no your database will not get deleted. – Mongrel – 2016-06-25T02:41:01.697

Answers

0

I was able to regain root access via phpMyAdmin using the following command in the terminal

killall -9 mysqld

Followed by restarting the web service for this particular server. That seemed to fix the problem.

user02103012

Posted 2016-06-21T14:46:31.023

Reputation: 25