Computer and IT knowledge - things to know
problem occured on ubuntu 18.04.xx
>> connect not possible via:
mysql -u root -p -h 127.0.0.1 -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
MariaDB [(none)]> FLUSH PRIVILEGES;
solution 2: enable root user
--------------------------------------
use mysql;
update user set plugin='mysql_native_password' where user='root';
flush privileges;
exit;
>> 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