2 computers on same MySQL database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

2 computers on same MySQL database

Post by ddragas »

How to connect 2 computers on same MySQL database that is instaled on one computer.
Computers are connected on LAN
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

First make sure networking is enabled in your configuration file, then add a remote user like so:

Code: Select all

GRANT ALL PRIVILEGES ON db.* TO user@192.168.1.1 IDENTIFIED BY 'password' WITH GRANT OPTION
obviously put your IP and all that in, you can now connect to this server just use it's IP as the hostname instead of the usual 'localhost'
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

It's working

Thank you
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

If I install database on disk drive "G:" will all above work?
User avatar
tasteslikepurple
Forum Commoner
Posts: 46
Joined: Thu Jan 26, 2006 3:38 am
Location: Bath, UK

Post by tasteslikepurple »

aslong as mysql is installed, working, and running, it will still work. i.e. if you can access the database on the computer it's installed on drive G, it will still work on the networked computer
Post Reply