1. Download MySQL 1.1 Download address https://downloads.mysql.com/archives/community/ 1.2 Version selection 2. Manage group and directory permissions 2.1 Unzip mysql tar -zxf mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz upload directory /home/tools 2.2 Rename mv mysql-5.7.29-linux-glibc2.12-x86_64 mysql-5.7.29 2.3 Move the specified directory mv mysql-5.7.29 /usr/local/ 2.4 Add user groups and users groupadd mysql useradd -r -g mysql mysql 2.5 Modify directory permissions chown -R mysql:mysql /usr/local/mysql-5.7.29/ 3. Install MySQL 3.1 Configure MySQL service cp /usr/local/mysql-5.7.29/support-files/mysql.server /etc/init.d/mysql 3.2 Modify mysql service vi /etc/init.d/mysql 3.3 Modify the configuration file my.cnf vi /etc/my.cnf The copied content is as follows, adjust the parameters as needed [client] port = 33066 default-character-set=utf8 [mysqld] # General configuration options basedir = /usr/local/mysql-5.7.29 datadir = /usr/local/mysql-5.7.29/data port = 33066 character-set-server=utf8 default_storage_engine = InnoDB sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZEO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 3.4 Initialize MySQL /usr/local/mysql-5.7.29/bin/mysqld --initialize--user=mysql --basedir=/usr/local/mysql-5.7.29 --datadir=/usr/local/mysql-5.7.29/data Success is as follows, please note the password 3.5 Start the service service mysql start 4. Login and remote settings 4.1 Login to MySQL ./mysql -u root p Remember the registration password 4.2 Change the root login password set password=password('new password'); 4.3 Enable remote access GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'; flush privileges; 5. Environment variables and startup configuration 5.1 Setting environment variables vi /etc/profile Add the following content #mysql environment export MYSQL_HOME=/usr/local/mysql export PATH=$PATH:$MYSQL_HOME/bin source /etc/profile Update system variables 5.2 Startup chkconfig --add mysql mysql service to the automatic service chkconfig mysql on Set automatic startup chkconfig --list View the service list Summarize This is the end of this article about the detailed process of building mysql5.7.29 on centos7 in linux. For more relevant content about building mysql5.7.29 on centos7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Teach you how to build hive3.1.2 on Tencent Cloud
>>: Example of Vue uploading files using formData format type
Preface: The previous article described several c...
Table of contents Achieve results Available plugi...
Sophie Hardach Clyde Quay Wharf 37 East Soapbox Rx...
In the XHTML language, we all know that the ul ta...
Server: Ubuntu Server 16.04 LSS Client: Ubuntu 16...
background In data warehouse modeling, the origin...
1. Use Centos image to build local yum source Sin...
system: CentOS 7 RPM packages: mysql-community-cl...
Installing Docker on CentOS requires the operatin...
1. Databases and database instances In the study ...
Configuration Example upstream backend { server b...
Table of contents 1. What is a hook? 2. Why does ...
Table of contents Axios Request Qs processing dat...
The textarea tag size is immutable Copy code The c...
Here is the mysql driver mysql.data.dll Notice: T...