Linux next version of MySQL installation illustrated tutorial
1. View the currently installed Linux version
Command: Lsb_release-a as shown
With the data in it you can see that the installed version is RedHat5.4, so we need to download the RedHat5.4 corresponding MySQL installation package
2. Download the MySQL installation file
The official website downloads the installation package because the local Redhat version is red Hat 5.4 and the operating system is 64-bit
So download the following installation package on the official website http://dev.mysql.com/downloads/mysql#downloads
Mysql-server-5.5.25a-1.rhel5.x86_64
Mysql-client-5.5.25a-1.rhel5.x86_64
Mysql-devel-5.5.25a-1.rhel5.x86_64
3. Install MySQL
1. Enter the directory of the installation files
2. Install MySQL server
RPM-IVH mysql-server-5.5.25a-1.rhel5.x86_64.rpm
Mysql-server Installation
3. Install MySQL client, mysql-devel
RPM-IVH mysql-client-5.5.25a-1.rhel5.x86_64.rpm
RPM-IVH mysql-devel-5.5.25a-1.rhel5.x86_64.rpm
Mysql-client-devel
Start the MySQL service
4. Modify the root initialization password in MySQL
1. The command is as follows:
#/usr/bin/mysqladmin-u root password ' rootadmin '
Format: Mysqladmin-u username-P Old password password new password
2. Example
#/usr/bin/mysqladmin-u root password ' rootadmin '
Note: Because Root does not have a password at the beginning, the-p old password can be omitted.
3. Log in with the new password, as shown in:
5. Restart and stop MySQL service
Start mode 1:service mysql start
Start Mode 2:/etc/init.d/mysql start
Stop mode 1:service MySQL stop
Stop mode 2:/etc/init.d/mysql shutdown
Restart mode 1:service mysql restart
Restart Mode 2:/etc/init.d/mysql Restart
MySQL latest installation illustrated tutorial under Linux