MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 30th, 2000, 05:26 PM
123finder.com 123finder.com is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 73 123finder.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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

Reply With Quote
  #2  
Old August 31st, 2000, 03:14 AM
christucker2 christucker2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 81 christucker2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Newbie: Connect to mySQL from another server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway