mysql-undefined function mysql_connect ()

Source: Internet
Author: User
1.1.1 Phenomenon

Connection to MySQL database error, error message is as follows:

Fatal error:call to undefined function mysql_connect () inch E:\Rainman\NetDisk\CurrentWork\wwwroot\phpinfo.php on line 3

1.1.2 Reasons

There should be no driver found for MySQL.

1.1.3 Solution

Here's how:

1, check the php.ini in the Extension=php_mysql.dll have not removed the comment (; as the comment character)

2, check php.ini in the Extension_dir have set the path (generally set to PHP installation directory \ext)

Note: The default parameter for Windows Extension_dir is ext, which is supposed to be a relative path, but the absolute path should actually be set here.

mysql-undefined function mysql_connect ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.