944,162 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2845
  • PHP RSS
Feb 17th, 2005
0

mysql_connect

Expand Post »
hi can anybody please help me with this,
i had install a php script but i got some problem with mysql_connect

the below is the error message:

Warning: mysql_connect(): Access denied for user: 'maximus_dbwebnews@localhost' (Using password: YES) in /home/maximus/public_html/webnews/WebNews/admin/func/db.inc.php on line 25
Database error: Link-ID == false, pconnect failed
MySQL Error: 0 ()
Session halted.

http://www.maximus-host.com/webnews/

i dont know what to do with this, and where is wrong?

please anyone help me with this!
Thank You!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dannyshi is offline Offline
3 posts
since Feb 2005
Feb 17th, 2005
0

Re: mysql_connect

Your php script can't connect to the database. Open the file db.inc.php and make sure that the server name (usually localhost), database name, database username, and database password are all correct.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 163
The Queen of DaniWeb
cscgal is offline Offline
13,646 posts
since Feb 2002
Feb 19th, 2005
0

Re: mysql_connect

Before you start cooking up PHP, ASP, PERL or other scripts I highly recommend making sure your User Access to your database is viable. To the point use MySQL Administrator or MySQL QueryBrowers or if you prefer the cmd line you can use mysql.exe

Make sure the Users have been GRANT'd access for the DATABASE on the HOST you are planning on using. For example, if you have a user called dbuser that needs to root access to database Maximus from host woobie you would need to:

GRANT ALL ON maximus.* TO dbuser@woobie IDENTIFIED by 'password'

Now if ol' dbuser is a shared access account that say can be used on multiple client computers you should wildcard the host. Thus a SQL statement like:

GRANT SELECT, INSERT, UPDATE, DELETE on maximus.* TO dbuser@'%' IDENTIFIED BY 'password'

Your case is probably related to the user name not being allowed to access the database from the host you are running the app. Thus revisit the user accounts and you should be able to trace it back from there. Note - I would definitly use a tool like MySQL Query Browser to validate the user logins and capabilities BEFORE I started applying scripts.
Reputation Points: 10
Solved Threads: 3
Light Poster
mcldev is offline Offline
31 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP-Nuke Tutorial #1: Altering the Header Tags
Next Thread in PHP Forum Timeline: DNS record types





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC