problem occured on ubuntu 18.04.xx

>> connect not possible via:
mysql -u root -p -h -P 3306

>> only connect via console / pipe is possible

solution 1: create an extra database admin user for network access
Mysql –u root –p
#create user sqladmin
MariaDB [(none)]> CREATE USER 'sqladmin'@'localhost' IDENTIFIED BY 'your-password';

#grant all privileges to the user
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'sqladmin'@'localhost';

#making the changes take effekt

solution 2: enable root user
use mysql;
update user set plugin='mysql_native_password' where user='root';
flush privileges;

>> check your password access afterwards!
maybe you need to set a new password:
MariaDB [(none)]> UPDATE mysql.user SET Password=PASSWORD('your-new-password') where user='root';

computer2know :: thank you for your visit :: have a nice day :: © 2024