MySQL 5.7.16 free installation version graphic tutorial under Linux

MySQL 5.7.16 free installation version graphic tutorial under Linux

This article shares the MySQL 5.7.16 free installation version tutorial for your reference. The specific content is as follows

MySQL: 5.7.16
Program directory: /usr/local/MySQL
Data file directory: /data/mysql

Download address: http://dev.mysql.com/downloads/mysql/; Linux-Generic is the installation-free version, I chose 64-bit

There is a document on the MySQL website for the specific installation method. If you are good at English, don't read what I wrote.

1. Preparation before installation

1. Turn off the firewall

#Close in setup

2. Disable selinux #This option has not been tested to see if it is necessary

shell>vi /etc/selinux/config
SELINUX=disabled # SELINUX parameter enforcing means enabling, disabled means disabling

3. Create a myql account

shell> useradd mysql


4.MySQL depends on libaio library, query and install libaio library

shell> yum search libaio
shell> yum install libaio


5. Check if there is an old version of MYQL in the system, please delete it. #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 

2. MySQL installation

1. Unzip the installation file; copy it to /usr/local/mysql

shell>tar –zxvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
shell>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_TABLES
datadir=/data/mysql
basedir=/usr/local/mysql
 
##open sqllog
general_log=ON
general_log_file=/data/mysql/query.log
 
 
#Open event scheduler event_scheduler = 1
 
#Open bin-log
log_bin=/data/bin/mysql-bin
server-id=230
#explicit_defaults_for_timestamp=true
 

3. Modify the root account .bash_profile

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

4.MySQL installation

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

5. Start mysql and set it to start at boot

shell>cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
shell>servicemysqld start
shell>chkconfig --add mysqld #Add to startup

6. Log in to mysql

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

Note: In this version, you must change your password after logging in before you can perform other database operations.

shell> grant all to 'root'@'%' identified by "foxconn.1"; 
#Authorize remote login to mysql; % allows all hosts to access, please use with caution

Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 5.7.16 installation and configuration method graphic tutorial
  • Detailed graphic tutorial for downloading, installing, configuring and using MySQL (win7x64 version 5.7.16)
  • Tutorial on installing the green version of mysql-5.7.16-winx64 on 64-bit win10 system
  • MySQL Installer Community 5.7.16 installation detailed tutorial
  • Linux uses rpm to install the latest mysql (5.7.16) steps and common problem solutions
  • MySQL 5.7.16 zip package installation and configuration method graphic tutorial
  • Detailed explanation of installing mysql 5.7.16 linux glibc2.5 x86 64 in CentOS 6.5 (recommended)
  • MySQL 5.7.16 winx64 installation and configuration method graphic tutorial
  • MySQL 5.7.16 green version installation tutorial detailed explanation
  • MySQL 5.7.16 ZIP package installation and configuration tutorial

<<:  How to completely uninstall Docker Toolbox

>>:  ReactRouter implementation

Recommend

Optimized implementation of count() for large MySQL tables

The following is my judgment based on the data st...

MySQL Series 3 Basics

Table of contents Tutorial Series 1. Introduction...

A brief analysis of MySQL's lru linked list

1. Briefly describe the traditional LRU linked li...

MySQL 4 methods to import data

1. Import mysql command The mysql command import ...

Summary of mysqladmin daily management commands under MySQL (must read)

The usage format of the mysqladmin tool is: mysql...

Detailed instructions for installing mysql5.7 database under centos7.2

The mysql on the server is installed with version...

JQuery implements hiding and displaying animation effects

This article shares the specific code of JQuery t...

Super detailed steps to install zabbix3.0 on centos7

Preface Recently, part of the company's busin...

A brief analysis of controlled and uncontrolled components in React

Table of contents Uncontrolled components Control...

Vue implements setting multiple countdowns at the same time

This article example shares the specific code of ...

Change the MySQL database engine to InnoDB

PS: I use PHPStudy2016 here 1. Stop MySQL during ...

Windows 2019 Activation Tutorial (Office2019)

A few days ago, I found that the official version...

Enterprise-level installation tutorial using LAMP source code

Table of contents LAMP architecture 1.Lamp Introd...

Vue parent component calls child component function implementation

Vue parent component calls the function of the ch...