Reputation: 2598
so I tried to connect to my local host with the 3306 port, and it works fine. Now, I'm using my second computer to connect to the database remotely.
Upvotes: 0
Views: 416
Reputation: 8372
Two computers can't have same IP. Check the second for IP address using ifconfig
command (if you have *nix system).
Upvotes: 2
Reputation: 12305
Follow this instructions:
Client PC:(sample ip: 192.168.0.105 want yo connect to mysql server on 192.168.0.172)
- Java app: user: dbuser, pass: dbpass, host: 192.168.0.172
Mysql Server PC:
- On mysql console: GRANT ALL PRIVILEGES ON *.* TO [email protected] identified by "dbpass";
FLUSH PRIVILEGES;
Now you have all set to make a remote conection from your client to your mysql server.
Upvotes: 0