|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Could I have my php scripts on server A and connect to the MySQL database on server B? If yes, how it would be done? Thanks ------------------ http://new.123finder.com/ - Helps you find cool domains for FREE & Registers it for only $14.95/yr http://www.guideclick.com/ - Qualified webmaster resources (affiliate programs, web design, tips) ------ Son |
|
#2
|
|||
|
|||
|
This can be done quite easily. You just need to get an install of MySQL working correctly on server B, and specify in the permissions tables (in the mysql database) that connections from host A are to be allowed. Then, connect to host B from host A using a connect string that specifies the host to connect to is B. Check out all the MySQL docs on this (generally the best place to start anyway). Look at: http://www.mysql.com/documentation/...ml#Adding_users
The SQL you'll need to set up the right permissions will be something like: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> GRANT ALL PRIVILEGES ON *.* TO phpuser@hostA IDENTIFIED BY 'some_pass' WITH GRANT OPTION; [/code] That'll give you administrative priviliges as user phpuser on hostA over all databases (*.*) with password some_pass |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Newbie: Connect to mySQL from another server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|