Quote:
|
Originally Posted by sixpacgenius
Ok heres my issue.
My friend has a dedicated server at host A.
He also have a web server at host B.
He wants to connect to the mySQL server in host B to the mySQL server in host A.
BUT He doesnt know how to allow host B's IP to be connectable to host A
It's on a Windows Server 2003 OS so no cpanel.
He also don't have Plesk.
Any idea how to do this?
I'm guessing we have to do something with my.ini?
|
GRANT ALL PRIVILEGES ON eshop_db.* TO 'john'@'localhost' IDENTIFIED BY 'maxalt';
and press enter. New User 'john' with password 'maxalt' created.
Hi sixpacgenius,
You have to create user and grant him privileges
mysql> GRANT ALL PRIVILEGES ON my_db.* TO 'user'@'friendshostip' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
if you want to connect to db on yours and friends server on the same page
$db_link1=mysql_connect($hostname1, $dbuser1, $dbpassword1)
or die("Unable to connect to the server!");
mysql_select_db($dbname1, $db_link1)
or die("Unable to connect to the database");
$db_link2=mysql_connect($hostname2, $dbuser2, $dbpassword2)
or die("Unable to connect to the server!");
mysql_select_db($dbname2, $db_link2)
or die("Unable to connect to the database"); etc
For details visit http://www.configure-all.com and select MySQL from main menu
i
Good luck
|