N
N
NewSantaClaus2021-08-16 16:52:29
linux
NewSantaClaus, 2021-08-16 16:52:29

Why can't I login to MySQL Linux Ubuntu 18.04?

Installed mysql and phpmyadmin on ubuntu 18.04 server running nginx
Everything was done according to this

But apparently I missed and didn't run the command FLUSH PRIVILEGES

At the moment I can't login to mysql.
My actions
mysql -u root -p
Enter password

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

And so 20 times

I tried to restart mysql and nginx but nothing helps. An empty password is also not suitable
Authentication method is worth It immediately swears mysql_native_password

when you try to entersudo mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

logged in via ssh as root all this time

New attempts:
Checking current status
service mysql status
Getting active
Getting Main PID: 18859
kill 18859
sudo service mysql start
Doesn't help

Please help

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lazy @BojackHorseman MySQL, 2021-08-16
Tag

then enter the wrong password, miracles do not happen

J
justhostRU, 2021-08-16
@justhostRU

delete
apt purge mysql*[desired names] mariadb
just in case delete the DBMS directory with settings and database and reinstall

S
SagePtr, 2021-08-17
@SagePtr

Look at /etc/mysql/debian.cnf and try to enter under these data, Ubuntu 18 should have such a file if installed from standard repositories.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question