PDA

View Full Version : site setup w/ php mysql


godfather55v
07-20-2010, 07: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,
matt

edbr
07-21-2010, 04: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

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


pics are worth a thousand words
http://webtechiowa.com/dreamweaverhelp/Capture.PNG
when i have local host as the url prefix the live view works but my "mysql" connection to my hosting provider gives me this.
http://webtechiowa.com/dreamweaverhelp/error.JPG

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!!

edbr
07-22-2010, 01: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
user
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

godfather55v
07-27-2010, 02: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!

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

davidj
07-28-2010, 10: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

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

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

1&1 dont allow this