An error occurred while connecting to the mysql server using the mysql extension Library in php.

Source: Internet
Author: User
Php fails to use the mysql extension library to connect to the mysql server. When php uses the mysql extension library to expand to the mysql server, errors always occur. It is said that the page cannot be opened, and no detailed error is reported. if I try it, other errors will be reported! The configuration is also made in the php. ini & nbsp; file. An error occurred while using php_info () to connect to the mysql server using the mysql extension Library.
An error always occurs when php uses the mysql extension library to expand the connection to the mysql server. It is said that the page cannot be opened, and no detailed error is reported. if I try it, other errors will be reported! The php. ini file is also configured. You can also see Mysql on the page using the php_info () function. It is hard to understand.
The following is my database connection statement:
$ Link = mysql_connect ("localhost: 3306", "root", "123456 ");
If (! $ Link ){
Die ("error message is". mysql_error ());
}
It is hard to understand. I don't know why.
The following are the configurations in my php. ini file.
Extension_dir = "D:/php/ext"
Extension = php_msql.dll
Shared:
------ Solution --------------------
Extension = php_myql.dll extension open not, open the error message to see.
------ Solution --------------------

$ Con = mysql_connect ("localhost", "mysql_user", "mysql_pwd ");
If (! $ Con)
{
Die ('could not connect: '. mysql_error ());
}

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.