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

Superficial Web Design

<br />I have always believed that Yahoo'...

Use iframe to display weather effects on web pages

CSS: Copy code The code is as follows: *{margin:0;...

Steps to set up Windows Server 2016 AD server (picture and text)

Introduction: AD is the abbreviation of Active Di...

Solve the problem that vue project cannot carry cookies when started locally

Solve the problem that the vue project can be pac...

Sample code for deploying Spring-boot project with Docker

1. Basic Spring-boot Quick Start 1.1 Quick start ...

A simple and in-depth study of async and await in JavaScript

Table of contents 1. Introduction 2. Detailed exp...

CentOS7 deployment Flask (Apache, mod_wsgi, Python36, venv)

1. Install Apache # yum install -y httpd httpd-de...

MySQL Learning: Three Paradigms for Beginners

Table of contents 1. Paradigm foundation 1.1 The ...

Learn to deploy microservices with docker in ten minutes

Since its release in 2013, Docker has been widely...

Detailed explanation of Vue two-way binding

Table of contents 1. Two-way binding 2. Will the ...

Parsing MySQL binlog

Table of contents 1. Introduction to binlog 2. Bi...

Solutions to black screen when installing Ubuntu (3 types)

My computer graphics card is Nvidia graphics card...