What is the default root password for mariadb in Arch Linux?

18,038

Solution 1

You should have been asked for the password during installation.

In case you do not remember your password, you can always reset your password.

Solution 2

The wiki says you should be able to log in with an empty password for root like so:

$ mysql -u root -p

However, you may still get an error when you use an empty password:

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

You also need to be the system root user in order to log in via this account. You can use sudo to accomplish this:

$ sudo mysql -u root -p

This should let you log in as root.

Share:
18,038

Related videos on Youtube

Vahid Kharazi
Author by

Vahid Kharazi

Updated on September 18, 2022

Comments

  • Vahid Kharazi
    Vahid Kharazi over 1 year

    I install mariadb in arch-linux. but I haven't got access to MySQL. I try this:

     mysql -u root -p
    Enter password: 
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    

    I see very similar question, and test all of answers but I can't resolve it.

  • michas
    michas over 10 years
    Arch Linux uses systemd. There is no /etc/init.d.