WinXP (32Bit) WAMP experience and PHP connection to the database

Source: Internet
Author: User
Tags website server mysql login
As a result of business needs, WAMP is used to build a web server. Put some simple items here for your reference. step 1: Follow the WAMP installation tips to install WAMP2.4. Step 2: complete local access to the website server, access the webpage you set in the LAN, and modify the database login name and user name. For more information, see the blog of azmiya.

As a result of business needs, WAMP is used to build a web server. Put some simple items here for your reference. step 1: Follow the WAMP installation tips to install WAMP2.4. Step 2: complete local access to the website server, access the webpage you set in the LAN, and modify the database login name and user name. For more information, see the blog of azmiya.

As a result of business needs, WAMP is used to build a web server. Put some simple items here for your reference.

Step 1: Follow the WAMP installation tips to install WAMP2.4;


Step 2: complete local access to the website server, access the webpage you set up within the LAN, and modify the database login name and user name. For more information, see the link to azmiya's blog http://www.cnblogs.com/azumia/archive/2012/06/06/2538872.html.

Note: After installing wamp, you may encounter an error such as "#1045 unable to log on to mysql Server" after modifying the root login password of the database user. I tried to modify config. inc. php and config. simple. inc. php of C: \ wamp \ apps \ phpmyadmin4.0.4. Therefore, reinstall the software.

Step 3: start to learn the basics of the php language and jump directly to the mysql database.

Method for calling your mysql database:

Stop the mysql services provided by WAMP and then start mysqld.exe. Use mysql login to the mysql database in cmd line.

The following code is used to connect PHP to the mysql database and query

  user_iditem_idstate";while($row = mysql_fetch_array($result))  {//  echo "
";echo "";echo "" . $row['user_id'] ."";echo "" . $row['item_id']. "";echo "" . $row['state'] . "";echo "";} echo "";// mysql_close($con);?>

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.