Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

{SOLVED} Can't access MySQL after system upgrades

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Ezingers
Posts: 42
Joined: 2015-02-28 18:32

{SOLVED} Can't access MySQL after system upgrades

#1 Post by Ezingers »

I loaded php7, mysql, and phpmyadmin so I could work on my database. I load a software that ask me to use (apt-get dist-upgrade) My system started updating everything including mysql. When it got to the blue screen, it only had 3 options like before, when I originally loaded mysql. All the options were the same, so I click OK. after that it never ask to verify user name=root or to enter or re-enter password like normal. It just returned to updating mysql. I thought my password was safe. Wrong! I tried to longin to phpmyadmin like normal and got this message.

(#2002 Cannot log in to the MySQL server)
and
(Connection for controluser as defined in your configuration failed.)

So I got on line found a fourm that told me to fallow this:
(this shows my input and the messages I got)

myname@debian:~$ sudo /etc/init.d/mysqld start
sudo: /etc/init.d/mysqld: command not found
myname@debian:~$ sudo mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Obviously, that didn't work.
So I found an ubuntu forum so I decided to check it out. Sense ubuntu is built off of debian, I figured that they might have an answer.
It said to try the fallowing:

myname@debian:~$
myname@debian:~$ sudo mysql --user=root mysql
[sudo] password for myname:

that didn't work nether. I got the fallowing message.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
mymane@debian:~$

This doesn't make any sense to me. Why didn't it ask me to re-enter the password if it was going to delete it anyway.

I'm designing q website and really need to be able to access mysql.
What should I do?
Last edited by Ezingers on 2018-04-22 00:46, edited 1 time in total.

Ezingers
Posts: 42
Joined: 2015-02-28 18:32

Re: Can't access MySQL after system upgrades (mysq upgrades?

#2 Post by Ezingers »

I found a solution. Purge the mysql-client and the mysql-community-server. Then I autoremoved all the dependencies. Then I reinstalled mysql-community-server which also loaded mysql-client.
Now how can I disable mysql from upgrading?

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Can't access MySQL after system upgrades (mysq upgrades?

#3 Post by dasein »

Ezingers wrote:how can I disable mysql from upgrading?
Sure, I'll do your searching for you. After all, your time is valuable

https://lmsptfy.com/?q=disable%20packag ... e%20debian

Post Reply