Linux under the RPM way to install the Mysql tutorial _mysql

Source: Internet
Author: User
Tags mysql in mysql tutorial

Each installation is always a little different, this time try it this way, also recorded.

1, first need to download the RPM package:

Mirrored address:http://mysql.mirrors.pair.com/Downloads/

According to different versions of the download can be downloaded, I downloaded is:

mysql-server-5.6.20-1.el6.i686.rpm

mysql-client-5.6.20-1.el6.i686.rpm

MYSQL-DEVEL-5.6.20-1.EL6.I686.RPM (This package is spare)

Because the use of the RPM installation of MySQL, then only installed mysql-server is not able to connect MySQL in the command line mode, so also need to install Mysql-client

2. Start Installation Server end:

Execute command:RPM-IVH mysql-server-5.6.20-1.el6.i686.rpm

After the installation is complete, you will be prompted:

hint One: install good mysql-server will randomly generate a root account password, guaranteed existence:/root/.mysql_secret here

tip Two: after installing Mysql-server first time to connect MySQL need to modify this default password

After confirming this, you need to execute the command: Find/-name MySQL to locate the Mysql-server installation location as follows:

/etc/logrotate.d/mysql
/etc/rc.d/init.d/mysql----Boot file
/usr/share/mysql----contains my-default.cnf files

/usr/bin/mysql
/usr/lib/mysql
/var/lib/mysql----Database File storage directory

Then execute: Find /-name my.cnf Look for the location of the Mysql-server configuration file, as follows:

/usr/my.cnf

Then start Mysql-server, execute: /etc/init.d/mysql start

Prompt to start after successful execution:ps-el | grep mysql

The system will list the related process information of mysqld, indicating Mysql-server installation is successful!

3, installation mysql-client:

Because there is no way to connect the database at the command line after the mysql-server is installed, you need to continue installing mysql-client to execute the command:

RPM-IVH mysql-client-5.6.20-1.el6.i686.rpm

After a while, the system prompts for a successful installation, and this time, executes:

Mysql-u root-p to connect MySQL, when the connection needs to enter the password, the password is generated before the random password, input can be successful!

After entering the MySQL console, execute: show databases;

found that the system prompts you to change the password first, then: Exit the system, and then execute: mysqladmin-u root-p password ' new-passwd '

To modify the password, then connect to MySQL again, enter the password you just set, and continue with show databases;

4, then there is a problem, if you still need to install Mysql-devel package?

Try it.

Executive:RPM-IVH mysql-devel-5.6.20-1.el6.i686.rpm

Prompt installation successful, then connect MySQL, execute show databases; Still can ...!

Google:

Mysql-devel seems not too necessary ~ ~

Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.