: Http://dev.mysql.com/downloads/mysql/5.5.html#downloads
The system will be selected after entering
After selecting linux-generic, there are many product options. We can download only the following two.
Server:
Linux-Generic 2.6 (x86, 32-bit), RPM Package
MySQL Server5.5.20 48.9 M
Download (MySQL-server-5.5.20-1.linux2.6.i386.rpm) MD5:
517e95a5d9ecc6d0f171dfbdfb9e62fb
Client:
Linux-Generic 2.6 (x86, 32-bit), RPM Package
Client Utilities5.5.20 16.2 M
Download (MySQL-client-5.5.20-1.linux2.6.i386.rpm) MD5:
3aca3154617e6457e7a08eaf41c43a7a
After the download is complete, you will get:
Go to the downloaded file directory for Installation
For example:
> Rpm-ivh MySQL-server-5.5.20-1.linux2.6.i385.rpm
> Rpm-ivh MySQL-client-5.5.20-1.linux2.6.i385.rpmp
Start mysql
> Service mysql start
LoginThe MySQL Command is mysql. the syntax of mysql is as follows:
Mysql [-u username] [-h host] [-p [password] [dbname]
Username and password are the username and password of MySQL respectively. The initial management account of mysql is root, and there is no password. Note: This root user is not a Linux system user. The default MySQL user is root. Because there is no password at first, you only need to type mysql for the first time.
Enter mysql
Root @ test1 local] # mysql
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql>
The prompt "mysql>" appears. Congratulations! The installation is successful!
Change logon Password
MySQL does not have a password by default. It is self-evident that the password is added after installation.
1. Commands
Usr/bin/mysqladmin-u root password 'new-password'
Format: mysqladmin-u username-p old password New password
Type the following command:
[Root @ test1 local] #/usr/bin/mysqladmin-u root password 123456
Note: because the root account does not have a password at the beginning, the old-p password can be omitted.
From the ChinFeng Column