Mysql data driver

Source: Internet
Author: User
Mysql data-driven mysql is not used. The problem now is that the data driver is not used and the program cannot connect to the database. who can help you remotely tune it down and deliver scores? php cannot connect to the database? Server? Or a local debugging environment? If the server can have an account, it won't work if it's local. you can't stand the feeling of one card and one card. check if the configuration in php. ini is correct. 1. data driver in ph mysql
Mysql won't be used. The problem now is that the data driver doesn't work and the program cannot connect to the database. who can help you remotely tune it and deliver the score?

------ Solution --------------------
Php cannot connect to the database? Server? Or a local debugging environment? If the server can have an account, it won't be able to handle it locally.
------ Solution --------------------
Check whether the configuration in php. ini is correct.
------ Solution --------------------
1. check whether mysql extension is available in php. ini.
2. is mysql service enabled?
3. whether the code is correct (including the user name and password)
------ Solution --------------------
Do you post your link code? Is the database started successfully?
------ Solution --------------------
PHP code
  
------ Solution --------------------
View the phpinfo. php file
------ Solution --------------------
Select the database:
PHP code
$ Conn = mysql_connect ("localhost", "root", "11111") or die ("error message :". mysql_error (); $ db = mysql_select_db ("shopdemo"); // select the database mysql_query ("set names gb2312") to be connected; // execute

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.