problems loading mysql database from local to remote
Hi
I wonder if some kind person could help me with my nightmare?
I am using CS3 Dreamweaver. Probably because I have been trying to sort out this problem for a while, I have gone off in a wrong direction? ![]()
1. I tried to connect my php form page to a remote database (called: aspainco_busdir) [note: aspainco_ is added as default by the remote server] - with no luck, I got all sorts of errors, so I decided to create a local database via CS3 (called; busdir) in order to test connections.![]()
2. Using XAMPP I successfully created a local server. The php form page (called: addinfo.php) works beautifully; uploading data to the database.
3. Now I want to upload 'addinfo.php' page and 'busdir' local database, but I can't find any meaningful advice on how to do this.
4. I have successfully uploaded the data from the local 'busdir' database to the remote 'aspainco_busdir' database ![]()
5. The directory (which has 'addinfo.php' and the 'connections' directory) has been uploaded.
6. I have configured the file created by Dreamweaver (connections/busdir.php) as below:
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_busdir = "localhost";
$database_busdir = "aspainco_busdir";
$username_busdir = "aspainco_busdir";
$password_busdir = "********";
$busdir = mysql_pconnect($hostname_busdir, $database_busdir, $username_busdir, $password_busdir) or trigger_error(mysql_error(),E_USER_ERROR);
?>
7. When I load 'addinfo.php' in the browser, I get:
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/aspainco/public_html/algorfa/htdocs/sitea/Connections/busdir.php on line 9
Fatal error: Access denied for user 'root'@'localhost' (using password: YES) in /home/aspainco/public_html/algorfa/htdocs/sitea/Connections/busdir.php on line 9
(Line 9 starts: $busdir...)
8. Looking at the code for 'addinfo.php' I notice it has:
mysql_select_db($database_busdir, $busdir);
$Result1 = mysql_query($insertSQL, $busdir) or die(mysql_error());
}
mysql_select_db($database_busdir, $busdir);
9. Do you think : mysql_select_db($database_busdir, $busdir); should be changed to mysql_select_db($database_aspainco_busdir, $aspainco_busdir); ?
10. Are there other files that I should change?
11. Is there an easier way of doing this?
Some help/direction/advice would be very welcome. Thanks
