LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-15-2005, 12:34 PM   #1
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Rep: Reputation: 15
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
 
Old 02-15-2005, 12:46 PM   #2
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Original Poster
Rep: Reputation: 15
mysql.ini has only one line: extension=mysql.so

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

AAAAAARRRRGHH! What's happening?
 
Old 02-15-2005, 01:19 PM   #3
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Original Poster
Rep: Reputation: 15
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?

Last edited by Chuck23; 02-15-2005 at 02:42 PM.
 
Old 02-15-2005, 06:36 PM   #4
LordDark
LQ Newbie
 
Registered: Feb 2005
Location: Ecuador
Distribution: Red Hat, Fedora Core
Posts: 15

Rep: Reputation: 0
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>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL access denied newlinuxnewbie Linux - General 3 10-25-2005 04:42 AM
mySQL Access denied for user Gerardoj Linux - General 2 03-21-2004 10:13 AM
MySQL: Access denied error Raptor Ramjet Slackware 5 02-22-2004 08:07 AM
MySQL - access denied X11 Linux - Software 1 08-19-2002 05:51 AM
MySQL access denied problems ?? huno Linux - General 1 05-16-2002 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration