Nick,
Monday, May 06, 2002, 1:30:22 PM, you wrote:
NW> Hi all, I'm getting intermittent 'Access denied' errors when running a
NW> php script to admin a mysql db. I've looked in the manual but cannot
NW> work out why I can connect in some parts of the script and not in others
NW> Perhaps there is some common 'gotchas' you might let me know about?
NW> Here is the code I use to connect:
NW> function _db_connect() {
NW> if(!$this->link_id) {
NW> $this->link_id=mysql_connect($this->host, $this->user,
NW> $this->pass);
NW> }
NW> if(!$this->link_id) {
NW> return FALSE;
NW> }
NW> $db=mysql_select_db($this->db) or die ("can't select db");
NW> return TRUE;
NW> }
NW> Many thanks for any help :-)
"Access denied" error occurs when you have no required privileges to
connect to the MySQL server. You gave incomplete error message and I
can't give you detailed answer. Please, check the following
link, you can find description of this error there:
http://www.mysql.com/doc/A/c/Access_denied.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php