warstormer Posted August 3, 2007 Share Posted August 3, 2007 Hi, am running an INSERT to a mysql database but get Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) I can connect to the database and run SELECT queries using the username and password I set up... Do I have to declare the password again? Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/ Share on other sites More sharing options...
almightyegg Posted August 3, 2007 Share Posted August 3, 2007 isthpassword accessed in this page where you are running the insert? Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-314995 Share on other sites More sharing options...
warstormer Posted August 3, 2007 Author Share Posted August 3, 2007 This is contained in an include file at the top of the page ?php // config.php $dbhost = 'localhost'; $dbuser = 'forbid_admin01'; $dbpass = 't0urn1quet'; $dbname = 'forbid_ugtmain'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-314998 Share on other sites More sharing options...
ViN86 Posted August 3, 2007 Share Posted August 3, 2007 your permissions are set correctly in MySQL correct? i use phpMyAdmin to modify permissions and tables, its a very easy to use interface. Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-315009 Share on other sites More sharing options...
DeepakJ Posted August 3, 2007 Share Posted August 3, 2007 make sure info is correct Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-315022 Share on other sites More sharing options...
warstormer Posted August 4, 2007 Author Share Posted August 4, 2007 your permissions are set correctly in MySQL correct? i use phpMyAdmin to modify permissions and tables, its a very easy to use interface. Ok, I've started using phpMyAdmin, but where do I set permissions? (sorry for being a bit dense here!) What i don't understand is why is says 'Access denied for user 'nobody'@'localhost'.... why nobody when the user is declared in my config.php file? Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-315496 Share on other sites More sharing options...
warstormer Posted August 5, 2007 Author Share Posted August 5, 2007 This is the full error: Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) Running a google search this crops up on loads of sites, there must be a simple answer... I use phpmyadmin to manage my database. The database was set up initially using CPanel.... Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-316162 Share on other sites More sharing options...
warstormer Posted August 6, 2007 Author Share Posted August 6, 2007 After going round and round with mysql and phpmyadmin I finally managed to get the permissions set properly... Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-316549 Share on other sites More sharing options...
ViN86 Posted August 6, 2007 Share Posted August 6, 2007 nice Quote Link to comment https://forums.phpfreaks.com/topic/63200-solved-insert-access-denied/#findComment-316699 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.