![]() The exact error said: SQL Error (2003): Can’t connect to MySQL server on ‘X.X.X.X’. ![]() He got an error while connecting to the database as MySQL user abc_test. Recently, one of our customers contacted us with a problem related to MySQL remote access. Let’s take a look at the top problems and how we fix them. If the rule does not exist, create the following rule: “If protocol is TCP and destination port is 3306” then accept.įrom our experience in managing server, we’ve seen that many customers had issues related to MySQL remote access in Webmin. Goto Webmin > Networking > Linux Firewall. For any Virtual Server that should have remotely accessible databases, go into Edit Databases -> Remote Hosts, and add the IP address of the remote system there.ģ. Firstly, we log into Webmin -> Servers -> MySQL Database Server -> MySQL Server Configuration, and set “MySQL server listening address” to “0.0.0.0”.Ģ. Let’s see how our Support Engineers do it from Webmin control panel.ġ. Today, we’ll see how our Support Engineers set up MySQL remote access and fix the related errors. What will you do, if you are away from your office network and need to instantly access your database?įortunately, the Webmin MySQL remote access allows you to access your database from different locations.īut, often wrong MySQL server settings or bad firewall cause problems with MySQL remote access.Īt Bobcares, we often get requests from our customers set up MySQL remote access in Webmin as part of our Server Management Services. ![]() Nano asks if you want to save, press y, then enter to save in the same place you opened /etc/mysql//mysqld.For security reasons, Webmin doesn’t allow remote access to the MySQL database server. RENAME USER TO ALL ON somedb.* TO here apparently represents any ip GRANT ALL PRIVILEGES ON some_db.* TO you want remote access, you need to change the user data (or make a new user): When you create a user on mysql it looks something like this, also when you do it via ssh on the server: This way is probably not so secure, with 3306 open, but a) I only have homework b) you still need the user name and password. I figured it out, this answer is just to help anyone who may have the same problem. Mysql> show variables where variable_name in ('hostname','port') Tcp6 0 0 :33060 :* LISTEN is from mysql on the server, confirming port 3306 I also got this info (assume my cloud ip is nc -v -w 2 123.456.789.123 3306Ĭonnection to 123.456.789.123 3306 port this mean mysqld is listening on 3530? Or is that the PID of sudo netstat -tap | grep mysql There must be something else that needs setting, server side.Īny tips what that might be please, I really need this to work. I restarted mysql: sudo systemctl restart mysql I changed the line bind-address to 0.0.0.0 (I also tried *) Netstat says mysqld is listening on 330, so I allowed both in the firewall ufwĬonnecting to the cloud server via ssh, I ran: When I run my Python script I get this error when trying to connect to the cloud server I have no experience running a cloud server. On the new Ubuntu 20.04 cloud server, I am getting connection refused. This works great on my old shared web-hosting webpage. I have a little Python script to collect students' homework and online classwork scores from the table allstudentsAnswers20BE.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |