Centos7 uses yum to install MySQL and how to achieve remote connection. Because MySQL was acquired by Oracle, it is currently recommended to use mariadb database Here are the steps: 1)yum install mariadb 2) yum install mariadb-server 3) yum install mariadb-devel chmod -R 770 /var/lib/mysql systemctl restart mariadb.service Now the MySQL installation is complete Initialize password: Execute the mysql command to set the initial password SET PASSWORD FOR 'root'@'localhost' = PASSWORD('input the password you like'); Tips: Remotely connect to the database: 1)mysql -u root -p password ;use mysql ; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; Allow any IP to log in as root user to flush privileges; effective immediately 2) Modify the my.cnf file and comment out the bindaddress statement, if any 3) Check the firewall systemctl status iptables.service /firewalld.service and shut down In addition, if you do not want to close the firewall, you can add rules. The following is to add using the command 1) Make sure the firewall is enabled 2) Execute the command 3) Run the command to check whether the rule is added successfully 4) Restart the firewall to take effect The above is the method that I introduced to you to install MySQL and realize remote connection using yum on Centos7. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Linux centOS installation JDK and Tomcat tutorial
>>: Example of using setInterval function in React
Table of contents Math Objects Common properties ...
Methods for changing passwords before MySQL 5.7: ...
Phrase elements such as <em></em> can ...
Brief review: Browser compatibility issues are of...
<br />Original: http://uicom.net/blog/?p=762...
Table of contents 1. Prepare data Create a data t...
Preface InnoDB stores data in tablespaces. In the...
Whether it is Samba service or NFS service, the m...
Table of contents background Compile glibc 2.14 M...
Online shopping mall database-user information da...
In MySQL, you may encounter the problem of case s...
Implementation requirements The form imitating El...
Table of contents What is a container data volume...
1. Go to the GraphVis official website to downloa...
1. Create a new user: 1. Execute SQL statement to...