MySQL8.0 installation and presentation (binary)

 

MySQL Related Products:

Oracle MySQL Cloud Service(commercial)

  Business billing software provides enterprise-grade MySQL database services based Mysql Enterprise Edition and Oracle Cloud Services

MySQL Enterprise Edition(commercial)

  Business billing software, in addition to providing MySQL database, but also includes a program to connect the interface (connector), table partitioning (partition), enterprise-level monitoring (monitor), high availability (HA), backup (backup) expansion (scalability) and other services

MySQL Cluster CGE(commercial)

  Business billing software, based on the functions and Enterprise Edition MySQL Cluster has provided enterprise-class high concurrency, high throughput data services

MySQL Community Edition

  Free software community to provide basic services and other derivatives of database services

MySQL Community Server

  The most popular open source database management software

Mysql Cluster

  Mysql database cluster-based service implemented, their characteristics can provide high concurrent load, etc.

Msql Fabric

  About Mysql database high availability solution and Mysql database fragmentation official offer

Mysql Connectors

  Services provide an interface JDBC / ODBC database such as Mysql access to applications

 

 

All versions of MySQL Community Server main difference

Mysql4.0 version:

  Added support for sub-queries, increasing the character set UTF-8 GROUP BY statement to increase muscle the ROLLUP mysql.user table only with better encryption algorithm, innodb began to support a separate table space

Mysql5.0 version:

  Adds support for stored procedures, views, Cursors, Triggers, XA transactions, increasing INFORATION_SCHEMA system database

Mysql5.5 version:

  Change the default storage engine for the Innodb, improve performance and scalability, increased the semi-synchronous replication

Mysql5.6 version:

  Innodb improve performance, support replication latency

Mysql5.7 version:

  Enhance performance and database storage engine, more robust replication capabilities, increasing the sys database management information system inventory release

Mysql8.0 subsequent updates ....

 

Official Website:  https://dev.mysql.com/downloads/mysql/

 

 

 

 

 Direct Download: https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.17-linux-glibc2.12-x86_64.tar.xz

 

# Uploaded to the server (uploaded to the server via xshell)

yum  install -y lrzsz 
rz -y # Choose your mysql download the installation package wget or direct download URL address to download directly on the server

 

# Copies the packet to the / usr / local / under decompression, and change the name

mv /root/mysql-8.0.17-linux-glibc2.12-x86_64.tar.xz /usr/local/
tar -xvf mysql-8.0.17-linux-glibc2.12-x86_64.tar.xz
mv mysql-8.0.17-linux-glibc2.12-x86_64 mysql

 

 

 Detailed catalog #

MySQL cd /
 LS 
drwxr -XR-the X-.   2  7161  31415    4096 6 Yue   27  06 : 35 bin # Run 
drwxr -XR-the X-.   2  7161  31415      86 6 Yue   27  06 : 35 docs document # 
drwxr -XR-the X-.   3  7161  31415     261 6 Yue   27  06 : 35 the include file header # 
drwxr -XR-the X-.   6  7161  31415    4096 6 Yue   27  06 :35 lib #lib packet
 -rw-R & lt - r--.   . 1  7161  31415  336 955 . 6 dated   25  18 is : 23 is the LICENSE      
 -rw-R & lt - r--.   . 1  7161  31415  101 805 . 6 dated   25  18 is : 23 is LICENSE.router 
drwxr . -XR-X   . 4  7161  31415      30 . 6 dated   27  06 : 35  man #man information 
-rw-R & lt - r--.   . 1  7161  31415     687 . 6 dated   25  18 is : 23 is the README
-R & lt -rw - r--.   . 1  7161  31415     700 June   25  18 is : 23 is README.router 
drwxrwxr . the -X-   2  7161  31415       . 6 June   27  06 : 35 RUN 
drwxr . -XR X- 28  7161  31415    4096 Jun   27  06 : 35 report this content share # character information 
drwxr -XR-the X-.   2  7161  31415      77 6 Yue   27  06 : 35 support- Files # mysql.server start the service 
drwxr -XR-the X-.  3  7161  31 415      17 6月   27  06 : 35 There

 

# Create a data directory data store

mkdir data

# Create mysql user and group authorization data directory

groupadd mysql
useradd mysql -g mysql
chown mysql.mysql data

 

#mysql initialization (generates files in the data directory)

bin / mysqld MySQL --datadir --initialize --user = / usr / local / MySQL / the Data 

#A the Temporary Generated IS password for root @ localhost: 8 <SdQftla / QJ 
# here will be displayed on the screen a temporary password 

if not the data files in the directory deleted, re-initialize

#如果报错  :bin/mysqld:error while loading shared libraries:libaio.so.1.....No such file or directory

Solution: yum install -y libaio

 

# Start mysql

cp mysql.server /etc/init.d/
 RM -rf / etc / my.cnf # likely that your server is installed MariaDB

 /etc/init.d/ mysql.server Start 
Starting MySQL.Logging to ' / usr / local / MySQL / Data / mysql.err ' . 
 SUCCESS !

# View the process there will be two

ps -ef|grep mysql
root       8456      1  0 15:12 pts/0    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysql.pid
mysql      8541   8456  4 15:12 pts/0    00:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=mysql.err --pid-file=/usr/local/mysql/data/mysql.pid
root       8586   8220  0 15:12 pts/0    00:00:00 grep --color=auto mysql

 

# Mysql connection

-uroot-MySQL - the p-
 -bash: MySQL: command not found

# Set Environment Variables

vi /root/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin
source /root/.bash_profile 

-uroot-MySQL - the p-
enter just the password:

# Still can not enter the command will complain

mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

#change Password

mysql> alter user user() identified by 'mysql';

 

# Log back

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

 

Guess you like

Origin www.cnblogs.com/sky00747/p/11506500.html