VMWare Linux MySQL 5.7.13 installation and configuration tutorial

VMWare Linux MySQL 5.7.13 installation and configuration tutorial

This article shares with you the tutorial of installing MySQL 5.7.13 on VMWare Linux for your reference. The specific content is as follows

1. Basic environment description

Virtual Machine: VMWare

Operating system: Linux

Database version: MySQL 5.7.13 Community Edition (don’t ask why not install the Enterprise Edition, because the Enterprise Edition costs money)

Background: The virtual machine can connect to the external network

2. Find out the details

Check if MySQL is already installed on Linux

① Start the service service mysqld start

If it is not installed, it will prompt

② Check whether the service exists on Linux chkconfig --list mysqld

If it is not installed, it will prompt

3. Create a /tools directory (download the file to this directory) and enter the /tools directory

# mkdir /tools
# cd /tools

4. Download MySQL 5.7.13

#wget http://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz

5. Decompression

# tar -xzf mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz

6. Create directory /data/mysql (installation directory)

# cd /
# mkdir data
# cd /data
# mkdir mysql

7. Create new mysql users, groups and directories

# groupadd mysql
# useradd -r -s /sbin/nologin -g mysql mysql -d /tools/mysql-5.7.13-linux-glibc2.5-x86_64

8. Switch directory and grant permissions

#cd /tools/mysql-5.7.13-linux-glibc2.5-x86_64
#pwd
#chown –R mysql .
#chgrp –R mysql .

#chown -R mysql /data/mysql

If steps 6-8 are not done, an error will be reported: bin/mysqld: no such file or directory

9. Set parameters

# bin/mysqld --initialize --user=mysql --basedir=/tools/mysql-5.7.13-linux-glibc2.5-x86_64 --datadir=/data/mysql

Note: remember the temporary password in the red box, you will need it later.

#bin/mysql_ssl_rsa_setup --datadir=/data/mysql

10. Modify the configuration file

# cd support-files 

# cp my-default.cnf /etc/my.cnf
# cp mysql.server /etc/init.d/mysql

# vim /etc/init.d/mysql

Modify the following:

# vim /etc/my.cnf

Modify the following:

After the modification, it is best to check it again. Sometimes accidental spelling mistakes can lead to a lot of messy errors.

11. Start mysql

Note: Check if the path used in the my.cnf configuration file exists. If it does not exist, create it yourself.

# bin/mysqld_safe --user=mysql &

bin/mysql --user=root –p

--Enter the temporary password generated in step 9

12. Change the root password

mysql> set password=password('123456'); --Enter a new password

13. Grant permissions

mysql> grant all privileges on *.* to 'root'@'%' identified by '123456';
mysql> flush privileges;

14. Check the results

mysql> use mysql;
mysql> select host,user from user;
mysql> exit;

15. Add system path

# vim /etc/profile

Add to:
export PATH=/usr/local/mysql/bin:$PATH

# source /etc/profile

16. Configure MySQL to start automatically

# chmod 755 /etc/init.d/mysql
# chkconfig --add mysql
# chkconfig --level 345 mysql on

Most of the above configurations refer to: MySQL 5.7.13 Installation and Configuration Methods Graphic Tutorial

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:
  • Solve the problem that Navicat cannot connect to the MySQL server in the Centos system in VMware
  • Install CentOS7 in VMware (set static IP address) and install mySql database through docker container (super detailed tutorial)
  • How to share MySQL database in Linux in VMware
  • MySQL8.0 installation process under Centos7 in VMware workstation16 and Navicat remote connection

<<:  WeChat Mini Program user authorization to obtain mobile phone number (getPhoneNumber)

>>:  How to implement Linux disk mounting, partitioning, and capacity expansion operations

Recommend

Detailed explanation of MLSQL compile-time permission control example

Preface The simple understanding of MySQL permiss...

How to introduce Excel table plug-in into Vue

This article shares the specific code of Vue intr...

Summary of some of my frequently used Linux commands

I worked in operations and maintenance for two ye...

Detailed explanation of MySQL partition table

Preface: Partitioning is a table design pattern. ...

Vue simple implementation of turntable lottery

This article shares the specific code of Vue to s...

A brief discussion on Yahoo's 35 rules for front-end optimization

Abstract: Whether at work or in an interview, opt...

The difference between Readonly and Disabled

To summarize: Readonly is only valid for input (te...

Implementation of Vue single file component

I recently read about vue. I found a single-file ...

MySql 8.0.11-Winxp64 (free installation version) configuration tutorial

1. Unzip the zip package to the installation dire...

How to install Nginx in Docker

Install Nginx on Docker Nginx is a high-performan...

25 div+css programming tips and tricks

1. The ul tag has a padding value by default in M...

Vue basic instructions example graphic explanation

Table of contents 1. v-on directive 1. Basic usag...