kev wood Posted July 17, 2008 Share Posted July 17, 2008 i am trying to transfer some web files across to another server and which has a mysql db attached to the site with l user name and password. i have moved all the files across and changed all the site paths over but when i try to register on the site i get this warning Warning: mysql_pconnect(): Access denied for user: '[email protected]' (Using password: YES) in /home/kchamber/public_html/mercury/db.php on line 11 Couldn't connect to server. originally i had left the user name and password the same and got the same result so i changed the user name and password to the ones i had to use to login to the server to upload the files and i am still getting the same error. Am i missing something out? do i need to set it up with its own login details to connect to the db on the server? Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/ Share on other sites More sharing options...
Xurion Posted July 17, 2008 Share Posted July 17, 2008 The permissions for that user do not allow it to connect from a different server. You'll need to grant the correct privileges. Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592354 Share on other sites More sharing options...
kev wood Posted July 17, 2008 Author Share Posted July 17, 2008 i know this is a stupid question but how do i do set the privileges? i am googling it as well but please still reply as google does not always give you the answers you are looking for Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592356 Share on other sites More sharing options...
Xurion Posted July 17, 2008 Share Posted July 17, 2008 Are you the database administrator? Do you have access to something like phpMyAdmin? Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592361 Share on other sites More sharing options...
kev wood Posted July 17, 2008 Author Share Posted July 17, 2008 no i do not have access to phpadmin on the server. when setting the db up the user name and password are set by me are they not Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592376 Share on other sites More sharing options...
kev wood Posted July 17, 2008 Author Share Posted July 17, 2008 i have logged on to the control pannel set up the the db and now it is allowing me to connect but i am getting this error now and do not know what it means. You have an error in your SQL syntax near ')' at line 15 line 15 on the db.php page is or die("Couldn't select database."); and on the create table page `tad3` varchar(250) not null, i cannot see ant errors here and the lines before all have there semi colons at the end Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592397 Share on other sites More sharing options...
kev wood Posted July 17, 2008 Author Share Posted July 17, 2008 the db is now set up on the server Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592406 Share on other sites More sharing options...
Xurion Posted July 17, 2008 Share Posted July 17, 2008 Need the line before the 'or die' bit. Because there is no semi-colon it counts it as the same line. Quote Link to comment https://forums.phpfreaks.com/topic/115202-solved-setting-up-db-on-server/#findComment-592457 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.