Reputation: 1
Please I want to connect two computers using Lan to connect one mysql database... Please can anyone help me
Upvotes: -3
Views: 379
Reputation: 1
Server Side : First, you have to set static ip on server. eg. 192.168.0.10 create users for each client and give them grant access. Client Side : set host to jdbc:mysql://192.168.0.10:3306/yourdatabasename use users created not root.
Upvotes: 0
Reputation: 1
Set a Static IP Address for the Host SQL Server PC (example 192.168.1.50, a local IP address in your LAN). One of the PCs can be a server or host. The client PCs can stay dynamic.
Open TCP Port 3306
on both PCs (client) firewalls.
On the Client PCs, replace the Host IP Address in place of localhost in the uniCenta Configuration > Database like jdbc:mysql://localhost:3306/yourdatabasename
--to-- jdbc:mysql://192.168.1.50:3306/yourdatabasename
.
The host (server PC) database configuration can stay as jdbc:mysql://localhost:3306/yourdatabasename
. Enter the Username and Password, then click the Test Button to see if a connection is made.
Upvotes: 0