PDA

View Full Version : Posting a database to my host


pikespeakwebsolutions
03-14-2006, 01:56 AM
I'm very new to using php. I have set up my apache server and i have no problem building local sites. My question is how once i build my sites localy i can put it online to my host (I Power Web). I have no problem positng it online. The error below is my problem.


Warning: mysql_pconnect(): Access denied for user: 'root@localhost' (Using password: YES) in /home/areareal/public_html/Connections/mysql.php on line 9

Fatal error: Access denied for user: 'root@localhost' (Using password: YES) in /home/areareal/public_html/Connections/mysql.php on line 9

Thanks for helping a 16 year old programer.

Creative Insanity
03-14-2006, 01:59 AM
Change your connection script for your hosters mysql user, password and database name.

pikespeakwebsolutions
03-14-2006, 02:23 AM
ok well from my hoster here is the script for a connection is there a way i can just save all my database files to there server. Well anyways here the connection string i got.
[$username = "dbuser";
$password = "password";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");
mysql_select_db ("dbname");]

thanks alot for your help[/code

Please use code tags when posting code]

pikespeakwebsolutions
03-14-2006, 03:30 AM
also i think it has something to do with the localhost and root permison is there a way i can set up a new user password and username and not use "localhost"

Creative Insanity
03-14-2006, 04:53 AM
You need to change dbuser, password and dbname for what they actually are.