MySQL 5.7.18 release installation guide (including bin file version)

MySQL 5.7.18 release installation guide (including bin file version)

The installation process is basically the same as the source version, except for the compilation step. This article only discusses the release version, which contains the bin file version.

Benefits: Each user can install their own MySQL Server

Target host system: CentOS 6.8

User: saojie (no administrator privileges)

Directory: /home/saojie/mysql-5.7.18

download

Linux Generic

Address: https://dev.mysql.com/downloads/mysql/

Unzip

tar zxvf mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.18-linux-glibc2.5-x86_64 mysql-5.7.18

Install

Write configuration file

Put my.cnf in the mysql-5.7.18 directory

[mysqld]
basedir = /home/saojie/mysql-5.7.18
datadir = /home/saojie/mysql-5.7.18/data
log_error = /home/saojie/mysql-5.7.18/data/mysql_error.log
port = 33306 #Port to avoid conflicts socket = /home/saojie/mysql-5.7.18/mysql.sock
general_log = on
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
socket = /home/saojie/mysql-5.7.18/mysql.sock

initialization

bin/mysqld --defaults-file=/home/saojie/mysql-5.7.18/my.cnf --initialize --user=saojie --basedir=/home/saojie/mysql-5.7.18/ --datadir=/home/saojie/mysql-5.7.18/data

Initialization will generate a random root password

start up

The first time you start up, you need to add a socket to avoid connecting to someone else's MySQL Server. And because root does not have remote access rights by default, root cannot connect to the specified IP and port at the beginning.

bin/mysqld --defaults-file=/home/saojie/mysql-5.7.18/my.cnf &
mysql -uroot -p --socket=/home/saojie/mysql-5.7.18/mysql.sock #If you don't add a socket, you may connect to another MySQL Server

closure

bin/mysqladmin -uroot -proot --socket=/home/saojie/mysql-5.7.18/mysql.sock shutdown

or

bin/mysqladmin -hxxx -Pxxx -uroot -proot shutdown

Other issues

Slow JDBC connections

Add skip-name-resolve to the configuration file [mysqld] and restart to skip DNS query

Do not output MySQL logs to the saojie user console

Specify the log_error address under [mysqld]

Convenience Scripts

#!/bin/bash
function client(){
  bin/mysql --defaults-extra-file=/home/saojie/mysql-5.7.18/my.cnf
}
function server(){
  bin/mysqld --defaults-extra-file=/home/saojie/mysql-5.7.18/my.cnf &
}
function stop(){
  bin/mysqladmin -uroot -p --socket=/home/saojie/mysql-5.7.18/mysql.sock shutdown
}
function pid(){
 ret=$(ps -ef |grep mysqld | awk '{print $2}')
  echo $ret
}
if [ $# = 1 ]; then $1; else server; fi

The above is the installation guide for MySQL 5.7.18 release that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Detailed steps for Java to connect to MySQL 8.0 JDBC (IDEA version)
  • Detailed explanation of MySQL 8.0 atomic DDL syntax
  • Detailed analysis of MySQL 8.0 memory consumption
  • Detailed graphic description of MySql8.023 installation process (first installation)
  • MySQL 8.0 New Features - Introduction to the Use of Management Port
  • MySQL 8.0 New Features - Introduction to Check Constraints
  • mysql8.0.23 msi installation super detailed tutorial
  • MySQL 8.0.23 free installation version configuration detailed tutorial
  • The best solution for resetting the root password of MySQL 8.0.23
  • Some improvements in MySQL 8.0.24 Release Note

<<:  50 lines of code to implement Webpack component usage statistics

>>:  Complete steps to configure a static IP address for a Linux virtual machine

Recommend

Usage and difference of Js module packaging exports require import

Table of contents 1. Commonjs exports and require...

Docker core and specific use of installation

1. What is Docker? (1) Docker is an open source t...

Example of using nested html pages (frameset usage)

Copy code The code is as follows: <!DOCTYPE ht...

Detailed description of HTML table border control

Only show the top border <table frame=above>...

Tutorial on migrating mysql from phpstudy to Linux

Project Purpose Migrate the data in MySQL 5.5.53 ...

How to use Linux locate command

01. Command Overview The locate command is actual...

Summary of HTML Hack Tags in IE Browser

Copy code The code is as follows: <!--[if !IE]...

Sample code for batch deployment of Nginx with Ansible

1.1 Copy the nginx installation package and insta...

Automatically install the Linux system based on cobbler

1. Install components yum install epel-rpm-macros...

CSS flex several multi-column layout

Basic three-column layout .container{ display: fl...

12 Javascript table controls (DataGrid) are sorted out

When the DataSource property of a DataGrid control...

Design Theory: Textual Expression and Usability

<br />In text design, we usually focus on th...

Commonly used English fonts for web page creation

Arial Arial is a sans-serif TrueType font distribu...