Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does Mysql access linux environment through public network

Shulou Source: shulou.com Published: 2022-06-02 09:17:27 10月04日 Update

This article introduces the relevant knowledge of "how Mysql accesses the linux environment through the external network". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

CREATE USER demo IDENTIFIED BY "123456" # create an account mysql > GRANT ALL PRIVILEGES ON shandong.* TO 'demo'@'%'WITH GRANT OPTION / / grant any host access to data. You can also do the following: GRANT ALL PRIVILEGES ON shandong.* TO' demo'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION; mysql > FLUSH PRIVILEGES / /.

Above are the settings for Mysql

Iptables-An INPUT-p tcp-m state-- state NEW-m tcp-- dport 3306-j ACCEPT / / linux allows mysql public network access

Modify the firewall to allow port 3306 to pass through

This is the end of the content of "how Mysql accesses the linux environment through the external network". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Environment content more knowledge practical successful learning next host dilemma reality situation data articles permissions cases ports editing websites industries accounts Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MySQL macOS NVidia Microsoft