rootKID Posted February 18, 2013 Share Posted February 18, 2013 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. Link to comment Share on other sites More sharing options...
birbal Posted February 18, 2013 Share Posted February 18, 2013 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 Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2013 Share Posted February 18, 2013 You also need to configure MySQL to allow remote connections. Link to comment Share on other sites More sharing options...
rootKID Posted February 19, 2013 Author Share Posted February 19, 2013 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)...? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2013 Share Posted February 19, 2013 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. Link to comment Share on other sites More sharing options...
rootKID Posted February 21, 2013 Author Share Posted February 21, 2013 ok...but localhost = website name... but IF i needed to use a different port, would it be the way i typed before?... Link to comment Share on other sites More sharing options...
Ingolme Posted February 21, 2013 Share Posted February 21, 2013 Yes, the port number directly follows the domain name or IP address. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 21, 2013 Share Posted February 21, 2013 If you're using mysqli then the port is an additional parameter for the constructor. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now