EXALAB / AnLinux-App

AnLinux allow you to run Linux on Android without root access.
Apache License 2.0
1.68k stars 246 forks source link

mariadb root login denied #266

Open vinniec opened 3 years ago

vinniec commented 3 years ago

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 commented 3 years ago

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
ChristinShaju commented 1 year ago

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)