[PHP] MYSQL ERROR CONNECT
Hi, I have been using this code for while: //1. CONNECT TO DATABASE mysql_connect(localhost); //2. SELECT A DATABASE mysql_select_db(smpk2); to connect to MYSQL database. but I get this error: Warning: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 could someone help me, please??? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MYSQL ERROR CONNECT
Ha.. Aussie person too eh? Ok.. Have you recently updated your php system? Reason I ask is the way you are using the functions mysql_connect and mysql_select_db are quite ... bad to say the least You should have permissions setup for a root account or something in your mysql.user table and then you can do this: $DB=mysql_connect(localhost,root,password); notice I now have a user/pass arg and also I am assigning the handle of the connection to a var ($DB) then use: mysql_select_db(smpk2,$DB); and that should work fine as long as user and pass are right and db exists.. (and server has mysql running of course :P ) if not.. let us know.. If you want to know how to setup users and permissions for MySQL.. give us a yell.. be glad to help out.. ::: : Julien Bonastre [The-Spectrum.org CEO] : A.K.A. The_RadiX : [EMAIL PROTECTED] : ABN: 64 235 749 494 : QUT Student #: 04475739 ::: - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 06, 2002 11:49 PM Subject: [PHP] MYSQL ERROR CONNECT Hi, I have been using this code for while: //1. CONNECT TO DATABASE mysql_connect(localhost); //2. SELECT A DATABASE mysql_select_db(smpk2); to connect to MYSQL database. but I get this error: Warning: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 could someone help me, please??? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MYSQL ERROR CONNECT
Thanks radix! I'm new to PHP that's why.. so, what should I do to fix this? please advise.. thanks again. Dani The_RadiX wrote: Ha.. Aussie person too eh? Ok.. Have you recently updated your php system? Reason I ask is the way you are using the functions mysql_connect and mysql_select_db are quite ... bad to say the least You should have permissions setup for a root account or something in your mysql.user table and then you can do this: $DB=mysql_connect(localhost,root,password); notice I now have a user/pass arg and also I am assigning the handle of the connection to a var ($DB) then use: mysql_select_db(smpk2,$DB); and that should work fine as long as user and pass are right and db exists.. (and server has mysql running of course :P ) if not.. let us know.. If you want to know how to setup users and permissions for MySQL.. give us a yell.. be glad to help out.. ::: : Julien Bonastre [The-Spectrum.org CEO] : A.K.A. The_RadiX : [EMAIL PROTECTED] : ABN: 64 235 749 494 : QUT Student #: 04475739 ::: - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 06, 2002 11:49 PM Subject: [PHP] MYSQL ERROR CONNECT Hi, I have been using this code for while: //1. CONNECT TO DATABASE mysql_connect(localhost); //2. SELECT A DATABASE mysql_select_db(smpk2); to connect to MYSQL database. but I get this error: Warning: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 could someone help me, please??? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MYSQL ERROR CONNECT
Warning: Access denied for user: 'nobody@localhost' (Using password: NO) in /www/host/doms/com/smpk2/create_tables.php on line 15 Hmm...let me see if I can decrypt that message. Apparently you were denied access with user nobody and you were not using a password. Read the manual page on mysql_connect(), you're missing some arguments. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php