Php failed to use mysql Extension Library to connect to mysql server MySQL extension server
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
Reply to discussion (solution)
Extension = php_myql.dll extension open not, open the error message to see.
$ Con = mysql_connect ("localhost", "mysql_user", "mysql_pwd"); if (! $ Con) {die ('could not connect: '. mysql_error ());}
Thank you for reading this. I have installed a mysql server and uninstalled it again. it may be libmysql. dll file problems, I will libmysql. dll and php5ts. the dll file has been copied. in windows/system, restart apache again!