database / mysql

MySQL: installing on Fedora 19

I have just installed Fedora 19, Schroedinger’s Cat on my computer. Here is how to setup MySQL on Fedora 19:

~$ sudo yum install mysql mysql-server

configure to start at startup:
~$ sudo chkconfig --levels 235 mysqld on

set password:
~$ sudo service mysqld start
~$ mysql -u root
mysql > SET PASSWORD FOR 'root'@'localhost'=PASSWORD('my_password');
mysql > SET PASSWORD FOR 'root'@'hostname'=PASSWORD('my_password');
mysql > SET PASSWORD FOR 'root'@'127.0.0.1'=PASSWORD('my_password');
mysql > exit

~$ 

And there you have it, you can now login as root, with your new password.
NOTE: I have seen that you can do the initial password setup when you first start mysql using:

~$ mysql -u root -p my_password

But I haven’t tested this out.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s