Linux mysql 5.7.16 installation-free graphic tutorial, mysql5.7.16

Source: Internet
Author: User

Linux mysql 5.7.16 installation-free graphic tutorial, mysql5.7.16

This article provides a free installation tutorial for mysql 5.7.16 for your reference. The details are as follows:

MySQL: 5.7.16
Program Directory:/usr/local/MySQL
Data File directory:/data/mysql

Http://dev.mysql.com/downloads/mysql/; Linux-Generic is an installation-free version.

The specific installation method is provided on the mysql website. If the English is good, you can skip it.

I. Preparations before installation

1. Disable Firewall

# Close in setup

2. Disable selinux # This item is not tested and required

Shell> vi/etc/selinux/configSELINUX = disabled # enforcing indicates that the SELINUX parameter is enabled, and disabled indicates that the selinux parameter is disabled.

3. Create a myql account

shell> useradd mysql

4. mysql depends on the libaio library and queries and installs the libaio library.

shell> yum search libaioshell> yum install libaio

5. Check whether the old version of myql exists in the query system. Delete the old version. # Query method: rpm-qa | grep mysql

6. Download mysql5.7.16

shell>wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz 

Ii. Install mysql

1. decompress the installation file and copy it to/usr/local/mysql.

shell>tar –zxvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gzshell>cp -R mysql-5.7.16-linux-glibc2.5-x86_64 /usr/local/mysql

2. Configure/etc/my. cnf

Shell> vi/etc/my. cnf [mysqld] # skip-grant-tables # specify a single table engine # SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLESdatadir =/data/mysqlbasedir =/usr/local/mysql # open sqlloggeneral_log = ONgeneral_log_file =/data/mysql/query. log # enable event plan event_scheduler = 1 # enable bin-loglog_bin =/data/bin/mysql-binserver-id = 230 # explicit_defaults_for_timestamp = true

3. Modify the root account. bash_profile

shell> vi/root/.bash_profile#PATH=$PATH:$HOME/binPATH=$PATH:$HOME/bin:/usr/local/mysql/bin

4. Install mysql

Shell> cd/usr/local/mysql/shell> bin/mysqld-initialize # Remember the temporary password shell> bin/mysql_ssl_rsa_setupshell> bin/mysqld_safe -- user = mysql & shell> chown-R mysql: mysql/usr/local/mysql/# Change permission shell> mkdir-p/data/mysql # create a data file directory and authorize shell> chown-R mysql: mysql/data/mysql

5. Start mysql and set startup

Shell> cp/usr/local/mysql/support-files/mysql. server/etc/init. d/mysqldshell> servicemysqld startshell> chkconfig -- add mysqld # add startup

6. log on to mysql

Shell> mysql-uroot-p # enter the previous temporary password shell> alter user 'root' @ 'localhost' identified by "fineex.1 ";

Note: After logging on to this version, you must change the password before you can perform other database operations.

Shell> grant all to 'root' @ '%' identified by "foxconn.1"; # authorize remote mysql logon; % is to allow access from all hosts, please use it with caution

Highlights: mysql installation tutorials for different versions mysql5.7 installation tutorials for various versions mysql5.6 installation tutorials

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.