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
This article example shares the specific code of ...
Preface After the project is migrated to .net cor...
Table of contents 1. Build basic styles through E...
Table of contents Application Scenario Simply put...
Create Table create table table name create table...
1: Install SVN yum install -y subversion 2. Creat...
1 The select tag must be closed <select><...
Table of contents Preface: 1. Reasons for the eve...
Cell -- the content of the table Cell margin (tabl...
Recently, a new requirement "front-end cache...
Document mode has the following two functions: 1. ...
Students who use Ansible know that Ansible only s...
If a div sets background-color and background-ima...
1. Grammar location [=|~|~*|^~|@] /uri/ { ... } 2...
When installing packages on an Ubuntu server, you...