0

I'm on ubuntu 18.04, i have installed maria-db,

maria-db is running with the command:

sudo service mysql status

but when i write this command:

sudo mysql -u root -p

ERROR: i get this error:

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

i solved this problem by editing my my.conf in my MySQL folder: i added skip-grant-tables in the [mysqld] section.

Then when I tried to write a command, like creating a table in my Maria-db DB using:

sudo mysql -u root -p

ERROR: it received this error:

ERROR 1290 (HY000): The Maria-db server is running with the --skip-grant-tables option so it cannot execute this statement

Your suggestions could really help me, i have been stuck here for a few days,

i tried to reinstall maria-db, to reconfigure maria-db too, but i get the same error; I tried LOT of solutions but I keep getting this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
1
  • You don't need to run it with sudo. There should be a temporary password in the log file. Dec 28, 2019 at 20:21

1 Answer 1

0

Use the mysql_secure_install script in order to init a new DB. Than you can create the user and grant them the access manually.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .