LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mysql/php access denied error (https://www.linuxquestions.org/questions/linux-software-2/mysql-php-access-denied-error-290569/)

Chuck23 02-15-2005 12:34 PM

mysql/php access denied error
 
I've been banging my head on my desk about this for the better part of a day, so I hope someone can tell me what's wrong.

MySQL 3.23.58-4 works fine on its own and mysql.so has been compiled (it would seem) for
PHP 4.3.8 which works fine with
Apache 4.2.1

I'm sure php works because I've done other little doodads with it, but getting it to play nicely with mysql has been nothing but headaches.

There is a clue as to what's going on in php --version, which yields a long list of mysql-related registration errors that read like this:

PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0

among others...

So what's happening? How do I fix it? I've got a nice database set up and a pretty smooth php script, but the access denied errors are driving me mad.

Help is greatly appreciated.

Chuck

Chuck23 02-15-2005 12:46 PM

mysql.ini has only one line: extension=mysql.so

php.ini looks for the module in the proper directory.

AAAAAARRRRGHH! What's happening?

Chuck23 02-15-2005 01:19 PM

A little more info... error message from running php script:

Warning: mysql_connect(): Access denied for user: 'testuser@localhost' (Using password: YES) in /path/to/my.php on line 34

Privileges are correct, password is correct -- same one I used to make the db and tables -- so why is access denied?

Sorry for posting thrice, but I just can't figure this out and it's frustrating.

UPDATE:

Figured it out. The problem was that I had " around my password in my script instead of '. Jeeez, I almost gave myself a stroke over THAT?

LordDark 02-15-2005 06:36 PM

look, It's all fine check if the MySQl is wake up, if MySQL Stand up then search where is the mysql.sock, the correct place is in the /tmp/mysql.sock

Sometimes is the problem, if it's your problem create a logical link

ln -s <path where is the mysql.sock actually>


All times are GMT -5. The time now is 10:00 PM.