Linux CENTOS7 installation mysql-5.7.11

Source: Internet
Author: User

1. Download and decompress MySQL database wget Http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.11-linux-glibc2.5-x86_64.tar.gzs Tar- XVF mysql-5.7.11-linux-glibc2.5-x86_64.tar.gz-c/usr/local/mysql-5.7.11 2. Create a soft link ln-s mysql-5.7.11 mysql 3. Create MySQL user and modify software permissions useradd-r-m-s/sbin/nologin mysql chown-r mysql.mysql/usr/local/mysql-5.7.11 chown-r mysq L.mysql/usr/local/mysql chgrp-r mysql/usr/local/mysql-5.7.11 4. Installing and initializing the database Cd/usr/local/mysql-5.7.11/bin/mysql _install_db--user=mysql--basedir=/usr/local/mysql-5.7.11/--datadir=/usr/local/mysql-5.7.11/data/--must be in MySQL root Directory to install MySQL, otherwise error cp-a./support-files/my-default.cnf/etc/my.cnf cp-a./support-files/mysql.server/etc/init.d/mys Qld modify/ETC/MY.CNF Basedir =/usr/local/mysql-5.7.11 DataDir =/usr/local/mysql-5.7.11/data Port = 3306#cd bin/#./mysqld_safe--user=mysql & [[email protected] scripts]#/etc/init.d/mysqld restart shutting down                                      Mysql..   [OK]                                          Starting MySQL ...  [OK] Close is/etc/init.d/mysqld stop #开机启动 chkconfig--level mysqld on 5. Initializing the password mysql5.7 generates an initial password, and the first login in the previous version does not require a login. Shell> Cat/root/.mysql_secret./mysql-uroot-p SET PASSWORD = PASSWORD (' root '); Flush privileges open access

[Email Protected]_199_194_centos bin]# mysql-uroot-proot


MySQL [(None)]> GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;


MySQL [(None)]> flush privileges;

Linux CENTOS7 installation mysql-5.7.11

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.