Skip to content

Instantly share code, notes, and snippets.

@nalingarg2
Created May 27, 2015 23:47
Show Gist options
  • Save nalingarg2/749852c6992ab18971e7 to your computer and use it in GitHub Desktop.
Save nalingarg2/749852c6992ab18971e7 to your computer and use it in GitHub Desktop.
install mysql server
sudo yum install mysql-server
sudo service mysqld start
sudo yum install mysql-connector-java
Configuring MySQL
Configure MySQL to use a strong password and to start at boot.
Set the MySQL root password. Note that in the following procedure, your current root password is blank. Press the Enter key when you're prompted for the root password.
$ sudo /usr/bin/mysql_secure_installation
[...]
Enter current password for root (enter for none):
OK, successfully used password, moving on...
[...]
Set root password? [Y/n] y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
[...]
Disallow root login remotely? [Y/n] N
[...]
Remove test database and access to it [Y/n] Y
[...]
Reload privilege tables now? [Y/n] Y
All done!
Ensure the MySQL server starts at boot.
On Red Hat systems:
$ sudo /sbin/chkconfig mysqld on
$ sudo /sbin/chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment