The specific steps of installing mysql5.7.18 under centos6.4 are shared with everyone. 1. First check whether MySQL has been installed and find the MySQL related software rpm package #rpm -qa | grep mysql 2. Delete everything related to mysql #yum -y remove mysql-libs-5.1.66-2.el6_3.x86_64 3. Install dependency packages #yum -y install make gcc-c++ cmake bison-devel ncurses-devellibaio libaio-devel 4. Create a mysql user group #groupadd mysql 5. Create user mysql under the mysql user group #useradd mysql -g mysql 6. Download mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz from the official website Download address: https://dev.mysql.com/downloads/mysql/ 7. Put mysql-5.7.19-linux-glibc2.12-x86_64.tar in the /opt folder 8. Unzip the file mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz #tar xzvfmysql-5.7.19-linux-glibc2.12-x86_64.tar.gz 9. Rename mysql-5.7.19-linux-glibc2.12-x86_64 to mysql and move it to /usr/local/mysql #mv mysql-5.7.19-linux-glibc2.12-x86_64 /usr/local/mysql Create a data directory under /usr/local/mysql #mkdir /usr/local/mysql/data 10. Return to the local directory #cd /usr/local Change the main content of the mysql directory and the files and subdirectories below it to mysql #chown -R mysql:mysql mysql/ Grant 755 permissions to the mysql directory and its files and subdirectories #chmod -R 755 mysql/ 11. Compile, install and initialize mysql, remember the password at the end of the command line #/usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql 12. Start the mysql service #/usr/local/mysql/support-files/mysql.server start 13. Make a soft connection and restart the MySQL service #ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql #service mysql restart 14. Make a soft link and put mysql in the installation directory in the /usr/bin directory #ln -s /usr/local/mysql/bin/mysql /usr/bin 15. Log in to msyql and enter the password (the password is the password generated by initialization in step 11) #mysql -u root -p 16. 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 17. Edit my.cnf, add the configuration file, and configure the content as follows #vi /usr/local/mysql/my.cnf [mysqld] port = 3306 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 18. Allow port 3306 #iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT #iptables -L -n #service iptables save 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:
|
<<: React uses emotion to write CSS code
>>: Solution to slow network request in docker container
Table of contents 1. Pre-analysis 1. Variable pre...
We need to first combine the air quality data wit...
Table of contents Create a layout Add CSS styles ...
First, let’s understand what Docker is? Docker is...
Table of contents 1. Introduction to Nginx 1. Wha...
How to change the password in MySQL 5.7.18: 1. Fi...
Installation environment: CentOS7 64-bit MINI ver...
Three knowledge points: 1. CSS descendant selecto...
How can you improve web page performance? Most de...
After creating a container locally, you can creat...
Table of contents Overview Defining methods on an...
Preface 1. Benchmarking is a type of performance ...
1. HTML Overview htyper text markup language Hype...
Introduction: This article mainly introduces how ...
Introduction to AOP The main function of AOP (Asp...