In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "CentOS7 how to configure MariaDB to allow IP to connect remotely to the database", so the editor summarizes the following, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to configure CentOS7 MariaDB to allow you to specify IP remote connection to the database" article.
Firewalls
The firewall before CentOS7 is different, for example, if you want to add port 3306:
# # all iptables-An INPUT-p tcp-m tcp-- dport 3306-j ACCEPT # # part ipiptables iptables-An INPUT-p tcp-s 138.111.21.11-dport 3306-j ACCEP service iptables save service iptables restart # # View iptables iptables-L-n
But this doesn't work in CentOS 7. Only by looking at the documentation do you know that CentOS 7 uses an enhanced version of firewall.
Firewall-cmd-- zone=public-- permanent-- add-port=3306/tcp1, firwall-cmd: a tool for operating firewall provided by Linux; 2,-- permanent: set to persistent; 3,-- add-port: identify the added port; 4,-- zone=public: the specified zone is public
Of course, if we are not used to using commands, we can change the configuration file directly.
Enter etc/firewalld/zone and modify public.xml
Public For use in public areas. Open the specified ip, the specified port, and the protocol to open port 9527 of any ip access server
As can be seen from the above configuration file:
1. Add the required rules: open source ip 122.10.70.234, port 514, protocol tcp;2, open source ip 123.60.255.14, port 10050-10051, protocol tcp;/3, open source ip arbitrary, port 9527, protocol firewall common commands # restart service firewalld restart # turn on service firewalld start # close service firewalld stop# view firewall service status systemctl status firewall# view firewall firewall-cmd-- list-all
After opening the server 3306 to the public, you also need to set the database user authorization
The above is about the content of this article on "how to configure CentOS7 MariaDB to allow you to specify IP remote connection database". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 244
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.