Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the default password of mariadb on fedora?

I installed mysql through yum just now and the OS fedora installed mariadb for me. I know mariadb is a new branch of mysql, but I can't understand why it does not ask me for setting the password. I have tried for 123456 and so on, but I failed. My fedora is new, and this is the first time to install mysql/mariadb. What should I do for it?

like image 820
Tony Avatar asked Nov 28 '13 16:11

Tony


People also ask

What is the default MariaDB password?

If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here.

What is the default password of MySQL in Linux?

There is no default password (empty password) for MySQL database server. You need to assign root password after installing MySQL via yum / rpm command. Some admin set the root password same as the server root password.


2 Answers

I had the same problem. It's true the password is empty, but even so the error message is shown. The solution is just using "sudo" so

$ sudo mysql 

will open the mysql tool

For securing the database, you should use sudo again.

$ sudo mysql_secure_installation 
like image 64
Alex Angelico Avatar answered Sep 17 '22 11:09

Alex Angelico


From https://mariadb.com/kb/en/mysql_secure_installation/ :

In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here.

the password will be blank

I think that's your answer.

like image 45
Floris Avatar answered Sep 20 '22 11:09

Floris