Jump to content
Sign in to follow this  
rootKID

is it possible to have a website on a server, and a Database on an another?...

Recommended Posts

hello again, since most of my websites are made in PHP.i would like to ask a maybe little kind of rookie question, if i have 2 servers, and wonna have the Database on the other, and the website on the other.what to do?... i know its possible... just, how?... do i replace the localhost with (examble) speed-scene.com?... (one of my websites)... or do i get it wrong again?... -thanks as usually.

Share this post


Link to post
Share on other sites

Yes you need to specify server name and port of mysql server instead of localhost. Also you need to set up firewall so that it dont block transaction over port which is used by mysql server

Share this post


Link to post
Share on other sites

ok, thanks...the MySql part with remote connection i allready knew, but what about port?...is that also in localhost?, like so: www.speed.scene.com:8080 (if port 8080)...?

Share this post


Link to post
Share on other sites

You really only need to specify the port when you connect if it is non-standard. The default port for MySQL is 3306, so it will try to use that port unless you specify otherwise.

Share this post


Link to post
Share on other sites

ok...but localhost = website name... but IF i needed to use a different port, would it be the way i typed before?...

Share this post


Link to post
Share on other sites

Yes, the port number directly follows the domain name or IP address.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...