MySQL data-driven, how to solve

Source: Internet
Author: User
MySQL Data-driven
MySQL does not use, now the problem is data-driven no matter, the program is not connected to the database, who can help remote adjustment, scores sent on

------Solution--------------------
PHP is not linked to the database? Server? or a local debugging environment? If the server can have an account, if the local there is no way to endure the kind of card one card feeling
------Solution--------------------
See if the configuration is correct inside the php.ini.
------Solution--------------------
1, in the php.ini of the MySQL extension did not
2. Is the MySQL service open?
3, the code is wrong (including user name, password, etc.)
------Solution--------------------
Do you post your link code? Are there any databases that have successfully started?
------Solution--------------------
PHP code
!--? PHP $con = mysql_connect ("localhost", "User", "PW  D "), if (! $con) {die (' Could not connect: '. Mysql_error ());
  }?--> 
------solution--------------------
View the phpinfo.php file
------Solution--------------------
You select the database to see:
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 connect to; Execute under 
  • 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.