wheelie34

msg:1580895 | 8:35 am on May 12, 2006 (gmt 0) |
try to just dump the local db (structure and data) to a .sql file then in phpmyadmin go to the db and either (if its a small file) copy n paste it into the sql command window, or below that browse for the file and upload, should work.
|
delboy1978uk

msg:1580896 | 5:44 pm on May 12, 2006 (gmt 0) |
yeah cheers but will the code for my pages still point to my local database? i want my local database to be used for testing on apache on my machine, then upload it to the remote site using the remote database
|
jatar_k

msg:1580897 | 5:50 pm on May 12, 2006 (gmt 0) |
take a look at your connection functions mysql_connect it should have the host in there, I am guessing it is set as localhost, if that is the case then you just need to look at your hosting and see if that setting is the same. If it is then you don't need to worry, it will work on both. If there is a different setting you need to use on your host then you could use a config file on each that has the appropriate connection settings.
|
storevalley

msg:1580898 | 5:53 pm on May 12, 2006 (gmt 0) |
| yeah cheers but will the code for my pages still point to my local database? i want my local database to be used for testing on apache on my machine, then upload it to the remote site using the remote database |
| Isolate the part of your script that connects to your db in a separate file. Have a copy on your server that connects to your remote db and a local copy that connects to your local db (just cloak this file in Dreamweaver so that it is ignored when you synch). <edit>jatar_k beat me to it :)</edit>
|
delboy1978uk

msg:1580899 | 9:54 pm on May 14, 2006 (gmt 0) |
cheers for the info, so if the hosting server's mysql setup is set to localhost then they should both (local and remote) use their own databases? obviously if not then the including the code from a seperate file would be a good idea, but i use dreamweaver to make the connection and design the pages, so how do you separate the connection code?
|
storevalley

msg:1580900 | 1:13 pm on May 15, 2006 (gmt 0) |
| if the hosting server's mysql setup is set to localhost then they should both (local and remote) use their own databases? |
| Yes ... "localhost" will refer to the machine on which your script is running.
|
|