Linux under the Mysql 5.6.17 installation graphics and text tutorial _mysql

Source: Internet
Author: User
Tags mysql client mysql download

This example for you to share the MySQL 5.6.17 installation tutorial simple version, for your reference, the specific content as follows

1.linux version mysql download (not recommended under 5.7, installation of the various bugs Ah, 5.6 is the best)

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)

2. Unpack the installation package

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

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

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

Note: the end of the catalog is not added/

4. Add System MySQL Group and MySQL User:

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

5. Installing 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

6. 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

7. Modify the MySQL root password , the root initial password is empty:

Execute command:./bin/mysqladmin-u root password ' password ' (single quotation mark must have, represent string)

8. Put the MySQL client on the default path:

N-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

Note the problem:
Self-feel MySQL 5.7 This series of versions are very sick, whether it is Windows or Linux, the installation will always have some inexplicable ideas. In the original installation of MySQL under Windows, young not sensible under the 5.7 version, the results of a variety of elusive bugs, online search can not find, and finally found a person in the same situation to tell is the version of the problem, installed in 5.6 good. And this install Linux, young frivolous I forgot the lesson of Windows, installed 5.7, the result has been a variety of bugs, hey, or too young. I hope you can learn from it.

9. After the installation of the use
After installation, you can enter Mysql-uroot-p, and then enter password to enter MySQL.
After you can use the various syntax of MySQL, you can first view the Database:show databases.

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.

Related Article

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.