1. Check whether MySQL has been installed on the current systemrpm -qa|grep -i mysql If the screenshot above appears, you need to delete MySQL 1. Delete related applications yum remove MySQL-client-5.5.40-1.linux2.6.x86_64 yum remove MySQL-server-5.5.40-1.linux2.6.x86_64 2. View files with MySQL in the file name find / -name mysql If it appears, you need to delete the file according to 3. Delete other MySQL services //mysql configuration file rm -rf /etc/my.cnf //If you do not delete this file, the reinstalled MySQL will not be able to set the password rm -rf /var/log/mysqld.log 2. If it has not been installed, proceed to the next step1. Unzip the MySQL installation package tar -zxvf MySQL-5.5.40-1.linux2.6.x86_64.rpm-bundle.tar You can see that we have unzipped several packages. We only need to install the service and the client. //Install the server rpm -ivh MySQL-server-5.5.49-1.linux2.6.i386.rpm //Install the client rpm -ivh MySQL-client-5.5.49-1.linux2.6.i386.rpm 2. Start the MySQL service (if the service fails to start, you need to delete it and reinstall it) service mysql start 3Set the initial MySQL password /usr/bin/mysqladmin -u root password 'root' 4. To prevent the service from having to be started every time the computer is turned on, set the MySQL service to start automatically. //Add to system service: chkconfig --add mysql //Automatically start: chkconfig mysql on 5. Enable remote service Login to mysql //-u followed by the username //-p is the initial password you just set mysql -uroot -proot Create a new account and authorize all permissions to support % that is, any remote address can connect //The latter is the password, which is used when we connect using the visualization software. grant all privileges on *.* to 'root' @'%' identified by '123456'; Refresh permissions flush privileges; 6. Open port Open Linux port 3306 /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT Save settings /etc/rc.d/init.d/iptables save SummarizeDon't forget to open the port. If you don't open the port, the MySQL view management software on Windows will not be able to connect. This is the end of this article about installing MySQL 5.5 database in CentOS 7 environment. For more information about installing MySQL 5.5 in CentOS 7, 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:
|
>>: Implementation code for taking screenshots using HTML and saving them as local images
The ECS cloud server created by the historical Li...
Table of contents 1. Ref and reactive 1. reactive...
Sometimes our pages will need some prompt boxes o...
Because the company asked me to build a WebServic...
A few days ago, I saw an example written by @Kyle...
The span tag is often used when making HTML web pa...
Table of contents 1. Install axios 2. Use of axio...
In the /etc/my.conf file, add the following line ...
Copy code The code is as follows: <html> &l...
During this period of time, while working on a pr...
Table of contents getting Started Data storage Co...
This article example shares the specific code for...
Table of contents 1. Introduction 2. Component De...
There are two common ways to make div background ...
Table of contents Preface Browser compiled versio...