barnigan Posted November 12, 2010 Share Posted November 12, 2010 in theory i have the correct permissions to do whatever i need to with the db's. So my question is: is there any other reason other than permission restriction that i would get this error? Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/ Share on other sites More sharing options...
ManiacDan Posted November 12, 2010 Share Posted November 12, 2010 Bad password. Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/#findComment-1133537 Share on other sites More sharing options...
mikosiko Posted November 12, 2010 Share Posted November 12, 2010 is your DB local or is in a remote server? if is in a remote server: - Are you sure that MYSQl is configured to allow remote connection? (networking enabled) - Or do you know if it is configured to allow access from any IP or specific IP's ? for local: - check if the grants are correct for that user. - and the obvious as ManiacDan pointed out... check the password Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/#findComment-1133540 Share on other sites More sharing options...
barnigan Posted November 12, 2010 Author Share Posted November 12, 2010 i don't think so. I can connect to mysql. I just can't do anything once i'm in $con = mysql_connect("svn.local","intern","qw7t5u9l"); if (!$con) //this part passes { die('Could not connect: ' . mysql_error()); } else { echo "successfull connection to mysql <br/>"; if(!mysql_select_db("AbsenceReportDb", $con))//this is true { echo "attempting to create abenceReportDB <br/>"; if(mysql_query("CREATE DATABASE absenceReportDB",$con))//this fails { echo "success database creation<br/>"; } else { echo "fail database creation: ".mysql_error()."<br/>"; } } else { echo "absenceReportDB already exists<br/>"; } the output of this code is: successfull connection to mysql attempting to create abenceReportDB fail database creation: Access denied for user 'intern'@'%' to database 'absencereportdb' it is a remote server and i have no idea but i would guess that it is configured for a remote connection since i'm not the only one that uses it I'm an intern at this company so i'm basically just relying on them saying what i can and can't do Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/#findComment-1133541 Share on other sites More sharing options...
mikosiko Posted November 12, 2010 Share Posted November 12, 2010 most likely you have your DB permits restricted ... (CREATE DATABASE per example). ask to whom host your host DB Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/#findComment-1133547 Share on other sites More sharing options...
barnigan Posted November 12, 2010 Author Share Posted November 12, 2010 that would be the guy who told me I had all the right permissions. thanks everyone, I'll go talk to him again and see what's up Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/#findComment-1133554 Share on other sites More sharing options...
barnigan Posted November 12, 2010 Author Share Posted November 12, 2010 PROBLEM SOLVED I'm not allowed to create Db's just create tables on the db they provide for me(a db who's existence I was not made aware of till just now), and it only took 2 days to figure this out...it's fun to be an intern. Quote Link to comment https://forums.phpfreaks.com/topic/218505-access-denied-for-user-intern-to-database-my_db/#findComment-1133626 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.