CenOS6.7 installs MySQL8.0.22 (recommended collection) 1. Download the MySQL installation package Official website download link: MySQL official website download, or click to download directly Select the version that corresponds to your system to download 2. Upload the installation package to Linux Use filezilla to upload. I am using SecureCRT to operate the Linux system. Just press Alt+P I put the downloaded installation package on the E drive. Upload via the following code put e:/mysql-8.0.22-1.el6.i686.rpm-bundle.tar After the upload is complete, it will be in the user directory under the home directory 3. Installation preparation Before installing, check if there is mysql in linux rpm -qa | grep mysql If there is, uninstall it. I will demonstrate it here. Uninstall it and reinstall it later. Uninstall all found rpm -e --nodeps Found the content Then delete the mysql-related files if any, and skip if none. find / -name mysqld* rm -rf the found files 4. Start decompression and installation Create a folder first mkdir /usr/local/mysql Unzip the MySQL tarball uploaded in the /home/user directory ( corresponding to your own user name ) to /usr/local/mysql tar -xvf mysql-8.0.22-1.el6.i686.rpm-bundle.tar -C /usr/local/mysql Start Installation You need to go into the mysql folder where you just unzipped it. Install mysql-community-common-8.0.22-1.el6.i686 rpm -ivh mysql-community-common-8.0.22-1.el6.i686.rpm --nodeps --force Install mysql-community-libs-8.0.22-1.el6.i686.rpm rpm -ivh mysql-community-libs-8.0.22-1.el6.i686.rpm --nodeps --force Install mysql-community-client-8.0.22-1.el6.i686.rpm rpm -ivh mysql-community-client-8.0.22-1.el6.i686.rpm --nodeps --force Install mysql-community-server-8.0.22-1.el6.i686.rpm rpm -ivh mysql-community-server-8.0.22-1.el6.i686.rpm --nodeps --force After the installation is complete, check it through rpm -qa | grep mysql You can see the four just installed 5. Modify the configuration file After completing the above steps, the my.cnf file has been generated. vim /etc/my.cnf Add at the end lower_case_table_names=1 6. Initialize and start the database initialization mysqld --initialize Authorize the mysql user for the mysql installation path folder: chown -R mysql:mysql /var/lib/mysql View database status service mysqld status Start mysql service mysqld start There is a pitfall that we encountered before. If we can't start it, we need to authorize it. If we can start it, we also need to authorize it. chmod -R 777 /var/lib/mysql 7. Log in to MySQL View Temporary Password Two ways 1. Find from the log: cat /var/log/mysqld.log 2. Filter and search from the log cat /var/log/mysqld.log | grep password Login to mysql mysql -u root -p 8. Change password Here I changed the password to 123456, please modify it yourself ALERT user 'root'@'localhost' identified with mysql_native_password by '123456'; Log out and log in again View the database 9. Configure remote access Assign all permissions on all tables in all databases to the root user at all IP addresses, and the password is 123456 create user 'root'@'%' identified with mysql_native_password by '123456'; grant all privileges on *.* to 'root'@'%' with grant option; flush privileges; 10. Set up Linux firewall Allow port 3306 and add this setting to the firewall rules /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT /etc/rc.d/init.d/iptables save Remote Connection Using Navicat Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.7 installation tutorials for various versions MySQL 5.6 installation tutorials for various versions mysql8.0 installation tutorials for various versions 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:
|
<<: Commonly used HTML format tags_Powernode Java Academy
>>: Implementation of Docker CPU Limit
The following content introduces the process and ...
Table of contents Tomcat class loader hierarchy W...
The first one: Using the CSS position property &l...
When we want to add a shadow to a rectangle or ot...
This article shares the specific code for JavaScr...
Preface: The Linux host is relatively easy to han...
1. Use floating method Effect picture: The code i...
Table of contents 1. Security issues with Docker ...
Docker has many log plug-ins. The default is to u...
This article shares the specific code of uniapp t...
Preface Many friends who have just come into cont...
Table of contents MySQL multi-version concurrency...
1. Introduction MySQL Group Replication (MGR for ...
Because I need to install MySQL, I record the ins...
Three ways to introduce CSS 1. Inline styles Adva...