The connection problem between php and MySQL is that Cainiao has struggled for an afternoon.

Source: Internet
Author: User
The connection problem between php and MySQL is that Cainiao has struggled for an afternoon. Echo & quot; 1111 & quot ";
// Mysql_connect ("127.0.0.1", "root", "admin ");
Echo & quot; 12221 & quot ";
?>
When mysql_content () is added, an error is displayed. the error log in tomcat prompts: PHP Warning: PHP Startup: in Unknown on line 0.
In php. ini, the semicolon before extension = php_mysql.dll has been removed.
Begging for solutions


Reply to discussion (solution)

Capture the MYSQL error message. how can this problem be solved?

It should be your php problem!

It should be your php configuration problem!

It should be your php problem!
Isn't adding a database processing any sentence in php. ini? Everything works before you connect to the database.

This may be helpful.
Http://download.csdn.net/detail/zqckzqck/5134595

This may be helpful.
Http://download.csdn.net/detail/zqckzqck/5134595
Php and tomcat are successfully configured, but the database connection fails, and phpinfo () can correctly display the configuration information.

Can mysql be connected successfully in the command line.

Phpinfo () correctly displays the configuration information.
What does it mean?

Mysql is not installed on my machine, but phpinfo can also display "correct information "...... It's just the dll information of php itself. first confirm that your mysql is okay and then study the php

PHP Startup occurs, most of which is an extension failure.
Since you encounter an error when using mysql, it means that the loading of php_mysql fails (he also needs a support database)
You need to place the php installation directory in the search path of the operating system.

PHP Startup occurs, most of which is an extension failure.
Since you encounter an error when using mysql, it means that the loading of php_mysql fails (he also needs a support database)
You need to place the php installation directory in the search path of the operating system.

Learning ~

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.