Install mysql5 on Redhat as4

Source: Internet
Author: User
1. Check whether other MySQL versions are included in the system. The command is as follows:
# Rpm-Qa | grep MySQL
If you have this software, uninstall it with rpm-E. The command is as follows:
# Rpm-e MySQL ***** (the name found above)
If you are prompted that some dependencies cannot be deleted during the deletion process, use the following command:
# Rpm-e -- nodeps MySQL *****

2. Download the RPM package from the official MySQL website. Select different RPM packages (including server and client packages) based on the CPU model and RedHat version of your server. The address is as follows:
Http://dev.mysql.com/downloads/mysql/5.0.html

3. Add users and user groups in RedHat. The command is as follows:
# Groupadd MySQL
# Useradd-G MySQL

4. Place the downloaded file in a directory of RedHat and run the command to install the RPM package of the server and client respectively. The command is as follows:
# Rpm-IVH MySQL-server-community-5.0.67-0.rhel4.i386.rpm
# Rpm-IVH MySQL-client-community-5.0.67-0.rhel4.i386.rpm

5. Modify the password of the root user:
# Killall mysqld
# Mysqld_safe -- user = MySQL -- skip-grant-tables -- skip-Networking &
# Mysql-u root MySQL
Mysql> Update user SET Password = PASSWORD ('newpassword') where user = 'root ';
Mysql> flush privileges;
Mysql> quit

6. Modify the remote access permission of the root user:
# Killall mysqld
# Mysqld_safe -- user = MySQL &
# Mysql-u root-P MySQL
Enter Password: (enter the new password modified in step 1)
Mysql> grant all privileges on *. * To 'root' @ '%' identified by 'root' with grant option;
Mysql> flush privileges;
Mysql> quit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.