AnLinux-App icon indicating copy to clipboard operation
AnLinux-App copied to clipboard

mariadb root login denied

Open vinniec opened this issue 5 years ago • 2 comments

I tried with Debian, Ubuntu and Kali (so in the end only with Debian derivatives, I also tried with void and centos but I don't know how to start the services so I couldn't do the test). Once installed mariadb, configured with "mysql_secure_installation" and started with "service mysql start" I get this error:

root@localhost:~# service mysql start
Starting MariaDB database server: mysqld ..
root@localhost:~# ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

If I try to restart the server I get this other:

root@localhost:~# service mysql restart
Stopping MariaDB database server: mysqld failed!
Starting MariaDB database server: mysqld already running.

And if I try to close Linux it is impossible and termux remain locked in waiting without return in it's prompt:

root@localhost:~# exit
logout

If you are interested in what I try to make,.is written in this forum: https://forum.language-learners.org/viewtopic.php?t=7566&p=163053#p177858

vinniec avatar Nov 13 '20 01:11 vinniec

I think that the problem with mariadb service that cant be stopped, start after this commands series:

mysql -u root -p
UPDATE mysql.user SET authentication_string=PASSWORD('mypass'), plugin='mysql_native_password'
WHERE User='root' AND Host='localhost';
FLUSH privileges;
quit

vinniec avatar Nov 14 '20 15:11 vinniec

I can't connect to MySQL in termux Showing this error while trying to connect:

$ mysql
ERROR 2002 (HY000): Can't connect to local server through socket '/data/data/com.termux/files/usr/var/run/mysqld.sock' (111)

ChristinShaju avatar Sep 14 '23 08:09 ChristinShaju