Linux under the Mysql 5.6.17 installation graphics and text tutorial detailed version _mysql

Source: Internet
Author: User
Tags mysql client

The Linux installation MySQL service is divided into two installation methods:

① source installation, the advantage is that the installation package is relatively small, only more than 10 m, the disadvantage is that the installation relies on more libraries, the installation of a long compilation time, installation steps complex error prone;

② Use the official compiled binary file installation, the advantage is the installation speed, installation steps simple, the disadvantage is that the installation package is very large, 300M or so. Here's a description of Linux installing MySQL with an official compiled binary package.

Mysql-5.6.17-linux-glibc2.5-i686.tar.gz

Mysql-5.6.17-linux-glibc2.5-x86_64.tar.gz

Linux system, 32-bit, 64-bit can

Method/Step

to MySQL website download mysql compiled binary installation package, in the download page select Platform: Option Linux-generic, and then pull the page to the bottom, 64-bit system download linux-generic (GLIBC 2.5) (x86, 64-bit), 32-bit system download linux-generic (GLIBC 2.5) (x86, 32-bit)

Unzip the 32-bit installation package:

Enter the directory where the installation package is located and execute the command: tarmysql-5.6.17-linux-glibc2.5-i686.tar.gz

Copy the extracted MySQL directory to the system's local software directory:

Execute command: Cpmysql-5.6.17-linux-glibc2.5-i686/usr/local/mysql-r

Note: The end of the catalog is not added/

Add system MySQL Group and MySQL User:

Execute command: Groupadd MySQL and useradd-r-g MySQL MySQL

To install the database:

Access to install MySQL software directory: Execute command cd/usr/local/mysql

Modify current directory owner for MySQL User: Execute command chown-r mysql:mysql./

Install database: Execute command./scripts/mysql_install_db--user=mysql

Modify current directory owner to root: Execute command chown-r root:root./

Modify Current Data directory owner for MySQL User: Execute command chown-r mysql:mysql data

Install to this database complete

Start MySQL service and add boot to boot MySQL service:

Add power-on Boot: Execute command CP Support-files/mysql.server/etc/init.d/mysql, put startup script into boot directory

Start MySQL service: Execute command service MySQL start

Execute command: ps-ef|grep mysql see MySQL service description started successfully, as shown in

To modify the root password for MySQL, the root initial password is empty:

Execute command:./bin/mysqladmin-u root password ' password '

Put the MySQL client on the default path:

Ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql

Note: It is recommended to use the soft chain in the past, do not directly package file replication, easy system to install multiple versions of MySQL

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.