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
This article shares a simple HTML shopping quanti...
<iframe src=”test.jsp” width=”100″ height=”50″...
After creating a container locally, you can creat...
Document Scope This article covers mode switching...
This article describes how to build a phalcon env...
There is such a requirement: an import button, cl...
Today I received a disk warning notification from...
Put your own web project in the webapps directory...
1. Download MySQL Click on the official website d...
Setting min-width and max-width properties in tab...
Table of contents 10,000 pieces of data were lost...
Congratulations on finally convincing your bosses...
User namespace is a new namespace added in Linux ...
As shown in the following figure: If the version ...
Preface Generally speaking, when we talk about Li...