Linux installation MySQL

Source: Internet
Author: User

Software download

Take CentOS 64-bit, mysql5.5 as an example.

Download mysql5.5 website:http://dev.mysql.com/downloads/mysql/5.5.html#downloads

Download the three files that the arrows refer to

Uninstall the MySQL that is already installed

1. Find out if MySQL was previously installed

Command: Rpm-qa|grep-i MySQL
You can see the following as shown:

2. Stop the MySQL service, delete the previously installed MySQL

Delete command: Rpm-e–nodeps package name

3, find the old version of MySQL directory, and delete the old version of MySQL files and libraries

Find/-name MySQL

Delete the corresponding MySQL directory

4. Manually delete/etc/my.cnf

Rm-rf/etc/my.cnf

5. Find out if the machine installs MySQL again

Rpm-qa|grep-i MySQL


No results, instructions have been uninstalled thoroughly, next install MySQL directly

Install MySQL

Go to the file directory after downloading.

Installing Devel

Installing the server

See the information to prove the installation was successful

Install Client

Start MySQL

Set Login Password

MySQL does not have a password by default

1. Command

usr/bin/mysqladmin-u root password ' new-password '

Format: Mysqladmin-u username-P Old password password new password

2. Example

Example 1: Add a password to root 123456.

Type the following command:

[Email protected] local]#/usr/bin/mysqladmin-u root password 123456

Note: Because Root does not have a password at the beginning, the-p old password can be omitted.

Linux installation MySQL

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.