View Full Version : site setup w/ php mysql

07-20-2010, 08:37 PM
i'm working on my first site that's using php and mysql. setup wamp on my pc and it works fine and the site works fine.

I want it so i can point at my hosting providers mysql server while using local apache as my testing server. However when i do this i have to make my URL prefix of the testing server the accual domain name (not local host) or my database connection is toast. However if it's set as the actual domain name then "live view" doesn't work.

any idea's,

07-21-2010, 05:31 AM
the connection to the srver is often (but not always) mysql.mydomain.com also remote connection may have to be authorised on your domain, you maybe able to do this from your control panel

07-21-2010, 03:53 PM
maybe there is a better way then what i'm doing.

pics are worth a thousand words
when i have local host as the url prefix the live view works but my "mysql" connection to my hosting provider gives me this.

and vise/verse if i have the proper domain name of the site I'm developing for (which is the hosting providers server) then live view dies and the mysql connection works fine.

In developing static pages in the past i have always setup my local as testing and remote as production. Should i be looking at doing something differently when developing dynamic pages?

Any help is greatly appreciated!!

07-22-2010, 02:21 AM
let me run through the basic , no offense meant but im not sure you have got it from your questions but i may be wrong

in the pic you are defining the server for your html pages the mysql server is a different connection which you establish witha php connection script using host, on your testing server this will be localhost but if you try to connect remotely it will be different
password these you set up and give permissions to .

as for work practice i personally dont work that way at all.
testing servers to me are to work untill i am satisfied with the result and only then will i upload to the live site. IMO if you use the live site as you suggest , then you are actually using the live server as a testing server and as for connecting to a remote mysql server is little point but as i say thats my preferred way, im betting not everyone would agree

07-27-2010, 03:44 PM
thanks for the advice, i'm currently doing just that (working completely locally and then uploading my database and files as i get a chunk completed.) However i still like to find a way to develop php locally while pointing to a remote database. As the amount of data grows it's going to get tire sum and tedious to keep them all synced up. Maybe you have some answers for me there too?

thanks again!

07-28-2010, 02:35 AM
have a look at this there is a free version http://www.sqlmanager.net/en/products/mysql/manager

07-28-2010, 11:12 AM
You may find that hosts dont allow 3rd party mysql manager apps to connect to remote db's

most hosts provide some means of admin to your database in the form of phpmyadmin or similar

07-29-2010, 02:14 AM
does that apply with the tunneling that they use david? i had thought that was generally allowed

07-29-2010, 09:43 AM
you can use tunnelling on some services

1&1 dont allow this