Ask Your Question
1

MySQL password?

asked 2012-12-28 08:02:55 -0500

Onno gravatar image

I installed MySQL su -c 'yum groupinstall "MySQL Database"'

The install was fine, silent too. The thing now is that I would also like to know the root password. Is there a way to know the root password? Is there an easy way to reset?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-01-04 22:46:18 -0500

agajan gravatar image

When you first install a MySQL server, the root user has no password. So you can log in with the following command:

mysql -u root

To set the password for the root user in a MySQL server, run the following command:

sudo mysqladmin -u root password NEWPASSWORD
edit flag offensive delete link more

Comments

the initial root password on install can be found by running

grep 'temporary password' /var/log/mysqld.log

LKF gravatar imageLKF ( 2018-10-16 17:28:52 -0500 )edit
1

answered 2012-12-28 09:24:50 -0500

hhlp gravatar image

updated 2012-12-28 09:41:28 -0500

MySQL Secure Installation

This program enables you to improve the security of your MySQL installation in the following ways:

    Set (Change) root password
    Remove anonymous users
    Disallow root login remotely
    Remove test database and access to it
    Reload privilege tables

Start MySQL Secure Installation Invoke mysqlsecureinstallation without arguments:

sudo /usr/bin/mysql_secure_installation

The script will prompt you to determine which actions to perform.

Note : answer 'Y' to all question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-12-28 08:02:55 -0500

Seen: 10,607 times

Last updated: Jan 04 '13