Compile-free installation of MySQL 5.7.19

Source: Internet
Author: User

For a long time did not install MySQL, need to install today to find out as soon as possible, record, amnesia when useful;


  1. Mkdir/soft/data/mysql--Building a directory

  2. Cd/soft

  3. wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.19-linux-glibc2.12-i686.tar.gz--Download

  4. Tar xvf mysql-5.7.19-linux-glibc2.12-i686.tar.gz #解压

  5. MV mysql-5.7.19-linux-glibc2.12-i686 mysql-5.7.19 #改下名字好记

  6. Useradd MySQL #建立用户

  7. Chown mysql:mysql-r/soft/mysql-5.7.19 && chown mysql:mysql-r/data/mysql

  8. CD mysql-5.7.19

  9. ./bin/mysqld--initialize datadir=/data/mysql/--Initialize the database and remember the password shown in the last line [email protected]: ivy.sxjt!0v0

  10. Vim/etc/my.cnf

    Added: [Mysqld]

basedir=/soft/mysql/mysql-5.7.19

Datadir=/data/mysql

Vim/soft/mysql-5.7.19/support-files/mysql.server.

To set the path:

basedir=/soft/mysql-5.7.19--set MySQL size, diameter

Datadir=/data/mysql--Set the data storage path

12.ln/soft/mysql-5.7.19/support-files/mysql.server/sbin/mysqld--Set links for easy invocation

13.ln/soft/mysql-5.7.19/bin/mysql/sbin/mysql--Set links for easy invocation

14.mysqld Start--Start mysqld service

15.mysql-p 'ivy.sxjt!0v0'--log in to MySQL

Mysql>set Password=password (' 123456 ')--You must change your password before you can use it, and change it here to 123456

Mysql>use MySQL;

Database changed

Mysql>



During the installation, there are a few questions that are very strange, to be patient analysis, such as

When starting the MySQL service, always prompt to not update the PID file, you need to set the parameters in the Mysql.server file:

Mysqld_pid_file_path=/data/mysql, after setting, prompt to start successfully, actually not shipped. And then restore this parameter to be normal .....


Finish


Compile-free installation of MySQL 5.7.19

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.