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

In-depth understanding of the use of CSS clear:both

clear:both is used to清除浮動This is the impression I...

Perfect solution to Docker Alpine image time zone problem

Recently, when I was using Docker to deploy a Jav...

How to quickly install tensorflow environment in Docker

Quickly install the tensorflow environment in Doc...

How to use the Fuser command in Linux system

What is Fuser Command? The fuser command is a ver...

Specific usage of CSS compound selectors

Intersection Selector The intersection selector i...

Nginx signal control

Introduction to Nginx Nginx is a high-performance...

JavaScript implements circular progress bar effect

This article example shares the specific code of ...

MySQL installation tutorial under Linux centos7 environment

Detailed introduction to the steps of installing ...

Introduction to Computed Properties in Vue

Table of contents 1. What is a calculated propert...

CSS tips for implementing Chrome tab bar

This time let’s look at a navigation bar layout w...

14 practical experiences on reducing SCSS style code by 50%

Preface Sass is an extension of the CSS3 language...

How to use a game controller in CocosCreator

Table of contents 1. Scene layout 2. Add a handle...

Implementation of single process control of Linux C background service program

introduce Usually a background server program mus...

MySQL date processing function example analysis

This article mainly introduces the example analys...

Detailed tutorial on installation and configuration of MySql 5.7.17 winx64

1. Download the software 1. Go to the MySQL offic...