Download address: https://dev.mysql.com/downloads/mysql/5.7.html#downloads Upload to server rz-be Unzip the file tar -xvf mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz Move and rename it mv mysql-5.7.36-linux-glibc2.12-x86_64 /usr/local/mysql Create mysql user groups and users and modify permissions groupadd mysql useradd -r -g mysql mysql If groupadd: group 'mysql' already exists appears, ignore it because you have installed mysql before, just skip it Create a data directory and grant permissions mkdir -p /data/mysql #Create directory chown mysql:mysql -R /data/mysql #Give permissions Configure my.cnf vim /etc/my.cnf The content is as follows [mysqld] bind-address=0.0.0.0 port=3306 user=mysql basedir=/usr/local/mysql datadir=/data/mysql socket=/tmp/mysql.sock log-error=/data/mysql/mysql.err pid-file=/data/mysql/mysql.pid #character config character_set_server=utf8mb4 symbolic-links=0 explicit_defaults_for_timestamp=true innodb_log_file_size = 512M max_allowed_packet = 200M After editing: wq! Save and exit Initialize the database Enter the mysql bin directory cd /usr/local/mysql/bin/ initialization ./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/data/mysql/ --user=mysql --initialize View Password cat /data/mysql/mysql.err Start mysql and change the root password First place mysql.server in /etc/init.d/mysql cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql Start mysql and view the mysql process service mysql start ps -ef | grep mysql This means that MySQL has been installed successfully. Next, change the password. First log in to MySQL. The previous one is randomly generated. ./mysql -u root -p #bin directory Follow the next five steps and log in again. SET PASSWORD = PASSWORD('123456'); ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; FLUSH PRIVILEGES; update user set host = '%' where user = 'root'; #Enable root to access from any host FLUSH PRIVILEGES;#Refresh Connect to mysql visualization tool Finish This is the end of this article about the tutorial on installing mysql5.7.36 database in Linux environment. For more relevant content about installing mysql5.7.36 in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: About browser compatibility issues encountered and solutions (recommended)
>>: Detailed explanation of JSONObject usage
Table of contents Preface Dynamic SQL 1. Take a l...
Here are some tips from training institutions and...
Table of contents 1. Introduction 1. What is an i...
This article example shares the specific code for...
1. unlink function For hard links, unlink is used...
Good database specifications help reduce the comp...
The detailed installation process of mysql5.7.21 ...
1. Create insert into [table name] (field1, field...
1. Go to the location where you want to store the...
Table of contents 1. What is componentization? 2....
Table of contents 1. Introduction to computed 1.1...
Understanding object.defineProperty to achieve re...
Solution: Add the following code in <head>: ...
This post introduces a set of free Photoshop wire...
What are slots? The slot directive is v-slot, whi...