Mysql debugging error. please help me. how can I solve this problem?

Source: Internet
Author: User
Tags apache php
Mysql debugging error: please help mysql installation and testing with Fatal & nbsp; error: & nbsp; Call & nbsp; to & nbsp; undefined & nbsp; function & nbsp; mysql_connect () & nbsp; in & nbsp; C: myenvapachehtdocstest. php & nbsp; on & nbsp; line & mysql debugging error: please help me
Mysql installation test error
Fatal error: Call to undefined function mysql_connect () in C: \ myenv \ apache \ htdocs \ test. php on line 3
1: I checked that mysql has been started.
Extension = php_mysql.dll
The semicolon before extension = php_mysqli.dll has been removed.
2: The path has been changed.
Extension_dir = "C:/myenv/php/ext"
3: php5ts. dll
The libmysql. dll file has been pasted to the system under WINDOWS.
4: The php module of apache has been loaded.
LoadModule php5_module C:/myenv/php/php5apache2_2.dll
PHPIniDir "C:/myenv/php"
AddType application/x-httpd-php. php. phtml
5 Test Code

$ Conn = mysql_connect ("localhost", "root", "1985032468 root ");
If ($ conn ){
Echo "succeeded in linking to the database ";
} Else {
Echo "failed to connect to database ";
}
?>
Thank you !!! Zero !!!

Mysql apache php

Share:


------ Solution --------------------
Phpinfo (); check whether the php. ini File Loaded by Loaded Configuration File is your modified php. ini.

After these modifications, restart the server.

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.