Install mysql5.5 for linux

Source: Internet
Author: User

: 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 Server
5.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 Utilities
5.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

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.