0

I would like to create a MySQL Server on my Windows 10 minicomputer. I've installed the latest MySQL Server Community, as Server Only. All works fine, I can access my new database with localhost.

But what I want now is being able to access it with another computer. I've tried to connect to it with my public IPv4 address, but it doesn't work. Actually, I can't even ping my mini PC's IPv4 address. (I've disabled Windows Defender/Firewall) I've tried to use Putty but I can't make it work.

I'm totally lost about what is my actual problem and what to do to get what I want.

(PS: My Desktop PC is connected by Ethernet, and my mini PC is connected with WiFi but on the same internet connection)

Any ideas?

Blackwood
  • 3,123
  • 11
  • 23
  • 32
SCH
  • 1
  • 1
  • Are you going to connect to the MySQL remotely from the same internal data network and subnet as is configured on the localhost of the MySQL Server? Are you going to create a different account other than root and grant it the explicit permission access it needs to the specific databases on the MySQL Server or are you just trying to get root to access it remotely? For root run `CREATE USER 'root'@'%' IDENTIFIED BY 'Pswword@123';` then `GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;` and lastly `FLUSH PRIVILEGES;` with the Windows firewall disabled as you state is already the case. – Vomit IT - Chunky Mess Style Jul 07 '19 at 20:54
  • See answers here for this detail plus other things.... https://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address but with MySQL you have to tell it what host(s) each user is allowed to connect from basically or else allow it to connect from any IP address but you should understand the risks of this with the root account. I would keep root locked down to localhost only is possible and then allow your accounts with explicit access to specific DBs rather than all permissions to everythign like root, and allow those to connect from any IP address. – Vomit IT - Chunky Mess Style Jul 07 '19 at 20:54
  • Thank you for you answer, but I've already tried it on another user than root and it still doesn't work (i've also tried with root even copy pasted your 3 lines) – SCH Jul 08 '19 at 18:14
  • I'm able to connect to root and to my personnal user on my server using 127.0.0.1 or localhost. So the logins are ok, same for privileges I guess? More information about my tries: I use my public IPV4 as the host, then my login/pw and the port 3306. Using TCP/IP when I try to connect remotely. – SCH Jul 08 '19 at 18:17
  • OK, are you saying that you have two computers on a ***local*** network, and you’re trying to communicate between them using an ***external*** IP address? And that *nothing is working?* Your problem has nothing to do with MySQL. – Scott - Слава Україні Jul 09 '19 at 03:11
  • Possible duplicate of [Unable to access outside service from inside LAN](https://superuser.com/questions/135366/unable-to-access-outside-service-from-inside-lan) – Scott - Слава Україні Jul 09 '19 at 03:11
  • I've two computers, one that will be used as a server. I want this one to host mySQL Database so I can connect to it on my other computer (and everywhere else). – SCH Jul 10 '19 at 05:42

1 Answers1

0

You will have to: 1) check your router and enable portforwarding for the desired port 2) Set up a dynamic dns on your router to access it at all times if you dont have a static ip

Thomas
  • 101
  • 1