


Detailed explanation of Mysql5.7.19 installation tutorial under Centos7
This article mainly introduces the detailed installation tutorial of Mysql5.7.19 under Centos7. The editor thinks it is very good. I hereby share it on the Script Home platform. Friends who need it can refer to it
1. Download
Download mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz from the official website, the version is 5.7.19
Download address:
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-linux-glibc2.12-x86_64.tar.gzLinux
2. Create mysql user group and user
l Create mysql user group
#groupadd mysql
l Create a mysql user under the mysql user group
#useradd mysql -g mysql
3. Determine the installation directory and data directory
My mysql installation directory is /data/mysql, and the data directory is /data/mysql/data.
4. Upload the installation file to the server
putmysql-5.7.19-linux-glibc2.12-x86_64.tar The .gz
file is placed in the /data/installfiles directory through the ftp tool.
5. Unzip the tar.gz file/data directory
#cd /data/installfiles #tar -xvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
6. Modify the directory name
Rename mysql-5.7.19-linux-glibc2.12-x86_64 to mysql and move it to /usr/local/ under mysql.
#mv mysql-5.7.19-linux-glibc2.12-x86_64 /data/mysql
7. Create a data directory
Create a data directory under /data/mysql
#mkdir /data/mysql/data
8. Authorize the mysql user
Change the mysql directory and the files and subdirectories below Change the file owner to mysql
#cd /data #chown -R mysql:mysql mysql/
Give the mysql directory and the files and subdirectories below it 755 permission
#chmod -R 755 mysql/
9. Compile, install and initialize mysql, and remember the temporary password
#/data/mysql/bin/mysqld --initialize --user=mysql --datadir=/data/mysql/data --basedir=/data/mysql
The temporary password installed at that time was: root@localhost:3?2YBeSg:Nte
10. Create a log file directory
mkdir -p /data/mysql/log/mariadb/ cd /data/mysql/log/mariadb/ touch mariadb.log chmod -R 775 mariadb.log chown -R mysql:mysql mariadb.log chown -R mysql:mysql /data/mysql
11. Start the mysql service
/data/mysql/support-files/mysql.server start
12. Log in to msyql and enter the password (the password is the initialization password in step 9)
#mysql -u root -p
13. Change the password to “123456”
msql>alter user 'root'@'localhost' identified by '123456'; mysql>use mysql; msyql>update user set user.Host='%' where user.User='root'; mysql>flush privileges; mysql>quit
14. Modify the /etc/my.cnf file
##
# instructions in http://fedoraproject.org/wiki/Systemd socket=/tmp/mysql.sock [mysqld] datadir=/data/mysql/data socket=/tmp/mysql.sock max_connections=1000 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/data/mysql/log/mariadb/mariadb.log pid-file=/data/mysql/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d
Summarize
The above is the detailed content of Detailed explanation of Mysql5.7.19 installation tutorial under Centos7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











When loading CentOS-7.0-1406, there are many optional versions. For ordinary users, they don’t know which one to choose. Here is a brief introduction: (1) CentOS-xxxx-LiveCD.ios and CentOS-xxxx- What is the difference between bin-DVD.iso? The former only has 700M, and the latter has 3.8G. The difference is not only in size, but the more essential difference is that CentOS-xxxx-LiveCD.ios can only be loaded into the memory and run, and cannot be installed. Only CentOS-xxx-bin-DVD1.iso can be installed on the hard disk. (2) CentOS-xxx-bin-DVD1.iso, Ce

Open the centos7 page and appear: welcome to emergency mode! afterloggingin, type "journalctl -xb" to viewsystemlogs, "systemctlreboot" toreboot, "systemctldefault" to tryagaintobootintodefaultmode. giverootpasswordformaintenance(??Control-D???): Solution: execute r

Windows operating system is one of the most popular operating systems in the world, and its new version Win11 has attracted much attention. In the Win11 system, obtaining administrator rights is an important operation. Administrator rights allow users to perform more operations and settings on the system. This article will introduce in detail how to obtain administrator permissions in Win11 system and how to effectively manage permissions. In the Win11 system, administrator rights are divided into two types: local administrator and domain administrator. A local administrator has full administrative rights to the local computer

Detailed explanation of division operation in OracleSQL In OracleSQL, division operation is a common and important mathematical operation, used to calculate the result of dividing two numbers. Division is often used in database queries, so understanding the division operation and its usage in OracleSQL is one of the essential skills for database developers. This article will discuss the relevant knowledge of division operations in OracleSQL in detail and provide specific code examples for readers' reference. 1. Division operation in OracleSQL

Set password rules for security reasons Set the number of days after which passwords expire. User must change password within days. This setting only affects created users, not existing users. If setting to an existing user, run the command "chage -M (days) (user)". PASS_MAX_DAYS60#Password expiration time PASS_MIN_DAYS3#Initial password change time PASS_MIN_LEN8#Minimum password length PASS_WARN_AGE7#Password expiration prompt time Repeat password restriction use [root@linuxprobe~]#vi/etc/pam.d/system-auth#nearline15:

1. The compressed folder is a zip file [root@cgls]#zip-rmydata.zipmydata2. Unzip mydata.zip into the mydatabak directory [root@cgls]#unzipmydata.zip-dmydatabak3.mydata01 folder and mydata02.txt are compressed into mydata.zip[root@cgls]#zipmydata.zipmydata01mydata02.txt4. Decompress the mydata.zip file directly [root@cgls]#unzipmydata.zip5. View myd

1.UncaughtError:Calltoundefinedfunctionmb_strlen(); When the above error occurs, it means that we have not installed the mbstring extension; 2. Enter the PHP installation directory cd/temp001/php-7.1.0/ext/mbstring 3. Start phpize(/usr/local/bin /phpize or /usr/local/php7-abel001/bin/phpize) command to install php extension 4../configure--with-php-config=/usr/local/php7-abel

Detailed explanation of Linux system call system() function System call is a very important part of the Linux operating system. It provides a way to interact with the system kernel. Among them, the system() function is one of the commonly used system call functions. This article will introduce the use of the system() function in detail and provide corresponding code examples. Basic Concepts of System Calls System calls are a way for user programs to interact with the operating system kernel. User programs request the operating system by calling system call functions
