Gossamer Forum
Home : General : Databases and SQL :

The diffirence of Mysql connection between Perl and PHP?

Quote Reply
The diffirence of Mysql connection between Perl and PHP?
Hi,

I can connect to more than one mysql databases on the same machine by PHP but not Perl/DBI. Connecting with Perl/DBi, I get the error message "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ". So is the user, whom php is using, is diffirent from the one of Perl/DBI?

Any idea?

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] The diffirence of Mysql connection between Perl and PHP? In reply to
Hi,

That error message means your DBD::mysql is not setup properly (it's got the wrong location of the mysql.sock file), or the permissions on the sock file are too restrictive. However, you shouldn't be able to connect to any database then, let alone more then one.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] The diffirence of Mysql connection between Perl and PHP? In reply to
Hi Alex,

Thanks for your response. It got the wrong sock file.

BTW, how can we know the current sockfile that PHP is using to connect?

Thanks,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] The diffirence of Mysql connection between Perl and PHP? In reply to
I managed to have it. Thanks!

Cheers,

Dat

Programming and creating plugins and templates
Blog