|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36193 Can't connect to MySQL
Submitted: 2006-01-28 21:02 UTC Modified: 2006-01-29 09:24 UTC
From: anishxt at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.1.2 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
4 + 9 = ?
Subscribe to this entry?

 [2006-01-28 21:02 UTC] anishxt at gmail dot com
I was using the PHP 4.3.4 with MySQL 5.0.15. There was no problem with PHP when connecting to the MySQL using 

mysql_connect(($dbhost, $dbusername, $dbuserpass);

But, after installed the PHP 5.1.2, I can't connect to MySQL using the same command:

mysql_connect(($dbhost, $dbusername, $dbuserpass);

which would prompt an error:

"Call to undefined function mysql_connect()"

Reproduce code:
mysql_connect(($dbhost, $dbusername, $dbuserpass);

Expected result:
Successful connection to MySQL 5.0.15

Actual result:
Call to undefined function mysql_connect()in line 12


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-28 21:36 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

How about  installing ext/mysql or using ext/mysqli?
 [2006-01-29 09:24 UTC] anishxt at gmail dot com
OoopS! I am very sorry. You was right. It wasn't a bug. I didn't configure the extension_dir in the php.ini file. And I didn't put the libmysql.dll into the system32 dir. 
Now it is working smoooooooothly! :)
Thank you for spending your time with my problem.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 22 21:03:40 2023 UTC