GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Jun-2003, 09:43
zabell zabell is offline
New Member
 
Join Date: Jun 2003
Posts: 4
zabell is an unknown quantity at this point
Question

can mysql run on a separate server?


i am wondering if mysql needs to be installed on the same server as the site that is using it? or can you have mysql set up on another server and just access it so long as both servers have php installed?

thanks
~zachary abell
  #2  
Old 05-Jun-2003, 09:46
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough
As far as I know you can have mySQL on any server you want, all you need to do is tell the other server where it is in the scripts you use. Instead of writing "localhost", you'd write the ip or url.

There are hosts that offer MySQL hosting for those that need more space too.
  #3  
Old 05-Jun-2003, 09:50
zabell zabell is offline
New Member
 
Join Date: Jun 2003
Posts: 4
zabell is an unknown quantity at this point
Thumbs up

thanks


just what i wanted to hear
  #4  
Old 05-Jun-2003, 10:14
zabell zabell is offline
New Member
 
Join Date: Jun 2003
Posts: 4
zabell is an unknown quantity at this point

follow up question


in response to my other question (above) you said that it shouldn't matter what server mysql is installed on - but i was wondering if i then want to use phpmyadmin which server would that get installed on?

thanks
~zach
  #5  
Old 05-Jun-2003, 11:28
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough
It doesn't matter, which server you choose to place phpMyAdmin on as long as you make it secure with passwords and the like.

In the config.inc.php alter these:

$cfg['PmaAbsoluteUri'] = 'https://www.example.com/accountname/phpmyadmin/';

Replace example.com/accountname with the base URL to your Web site.

$cfg['Servers'][$i]['host'] = 'example2.com';
$cfg['Servers'][$i]['port'] = 'XXXXX';

This is the host that your MySQL server is running on and the port that it is using.

Rob
  #6  
Old 05-Jun-2003, 12:12
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
Quote:
Originally posted by jrobbio
It doesn't matter, which server you choose to place phpMyAdmin on

Thats not really true....

you need to have Apache and PHP on both servers to do that.

the best thing todo is just place phpmyadmin on the server where your site is.

but when you got Apache and PHP on the same server as MySQL you can use that server, it will be little bit faster
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #7  
Old 06-Jun-2003, 14:32
Elmseeker's Avatar
Elmseeker Elmseeker is offline
Junior Member
 
Join Date: Jan 2003
Posts: 87
Elmseeker is on a distinguished road
Lightbulb

Actually, one of the best ways to access a MySQL database remotely ie Apache/PHP on one server and MySQL on another is probably the http://www.mysql.com/products/mysqlcc/index.html. You can also use phpMyAdmin though, and no you do NOT have to have either Apache NOR PHP running on the machin where MySQL is running only on the server you wish to access it from...like so:

PHP Code:

$i++;                                                                                                          
$cfg['Servers'][$i]['host']            = 'server-running.mysql.com';
$cfg['Servers'][$i]['port']            = '';
$cfg['Servers'][$i]['socket']          = '';
$cfg['Servers'][$i]['connect_type']    = 'tcp';
$cfg['Servers'][$i]['controluser']     = '';
$cfg['Servers'][$i]['controlpass']     = '';
$cfg['Servers'][$i]['auth_type']       = 'config';
$cfg['Servers'][$i]['user']            = 'your_mysql_user_name';
$cfg['Servers'][$i]['password']        = 'your_mysql_password';
$cfg['Servers'][$i]['only_db']         = 'your_database_name'; 



The reason you don't need to have Apache or PHP running on the MySQL machine is that MySQL opens it's own port, if it is set to the default port there is no need to update the port setting above as phpMyAdmin will automagically connect directly to the database it has nothing to do with Apache or PHP on the MySQL server at all. PHP is 100% server side so it does need to be installed on the server you are running phpMyAdmin from but other than that you should be good to go! I access several MySQL Databases this way on machines with no web server and no PHP...Enjoy!
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A problem Between MySQL <> phpBB mirable MySQL / PHP Forum 3 10-Sep-2003 06:31
MySQL Syntax Error DropZite MySQL / PHP Forum 3 09-Jul-2003 05:00
Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More EyotaHosts Web Hosting Advertisements & Offers 0 28-Jun-2003 14:54
mysql vs sql - what is the difference zabell MySQL / PHP Forum 2 14-Jun-2003 17:32
Teraan - 100mb windows 2000 no ads. MySQL, CGI/Perl see list for rest jrobbio Free Web Hosting 1 13-Feb-2003 05:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:54.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.