Chat with us, powered by LiveChat
How to install MySQL on Red Hat systems?

How to install MySQL on Red Hat systems?

MySQL is easiest to install on Red Hat systems using the RPM packages. To install MySQL in the same directory as the RPM packages use the command:
# rpm -Uvh *.rpm

Note: You most likely need to do this as the root user. Either log in or su to root.

After MySQL is installed you need to set the root password. To do this use the following commanding changing my_password to the password you want for the root user to access MySQL.
# mysqladmin -u root password ‘my_password’

Note: If the MySQL service is not running, you may have to start it by hand before trying to set the password. It should start automatically when the computer boots. The command to start MySQL is:
# /etc/rc.d/init.d/mysqld start

You can test the MySQL installation by doing the following:

# mysql mysql (connect to mysql database)
Enter Password:
mysql> SELECT * FROM user; (grab some data out of user table)

This should return the data in the user table. Type exit to leave.


Leave your comment

Pin It on Pinterest

Share This