Database connection problems

Source: Internet
Author: User
The MySQL password has been changed for Wamp2.0 installed in the local test for database connection problems. However, when installing the website, the following error occurs: Warning: mysql_query (): supplied argument is not a valid MySQL-Link resource in... the corresponding code is mysql_query ($ SQL, $ link) or die (mysql_error (); my configuration file has changed the password.


Reply to discussion (solution)

Obviously, $ link is not a resource.

Check what the code for connecting to MySQL is above. the user name and password are correct.

Paste the specific code to see

All of them are correct ..

The error code is
Mysql_query ($ SQL, $ link) or die (mysql_error (); // send an SQL request for creating a member table @ zy205817

$ Link? Generation? What is it ??? Outbound? Look.

$ Link = mysql_connect ($ host, $ user, $ pass );

$ Link = mysql_connect ($ host, $ user, $ pass) or die (mysql_error ());

Changed or displayed this error.

Paste your code

The configuration information has been changed .. However, the database does not have data, but the test file is correctly displayed.

Generation ?? Yes ??.

What are you using ?? Is the file system positive ?, You ?? Ratio? Where? Different.

I want to see you
$ Link = mysql_connect ($ host, $ user, $ pass) or die (mysql_error ());
The error message Warning: mysql_query (): supplied argument is not a valid MySQL-Link resource in... row number appears.
Code


If you don't see the problem, follow #14 to post the code and check out your require '20-1. php'. what is it?

1. run cmd to test mysql connection.
2. write a php script to test the connection code.

Solved. it is my space error.

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.