MySQL cannot be installed in win7.

Source: Internet
Author: User

MySQL cannot be installed in win7.

My problem is that the original service is retained in Windows 7 because it has not been uninstalled. As a result, subsequent installation and startup services fail.

Another reason: MySQL data in programdata is not deleted. programdata is in C:, and information previously installed in MySQL needs to be deleted.

Finally, you can delete the service through the registry. Of course, MySQL services can be deleted through the DOS command...

Start Apache. After MySQL service is started, you can see

<? PHP $ connect = mysql_connect ("localhost", "root", "123456"); If (! $ Connect) echo "MySQL connect error! "; Else echo" I love my life, I love wangjuan! "; Mysql_close ();?>

Yes.

But I found that at the beginning of win7, I only knew localhost, that is, in the address bar, only localhost can be input for printing.

I love my life, I love wangjuan! If you enter 127.0.0.1 or print it works! Later, the hosts file under c: \ windows \ system32 \ drivers \ etc was modified, and the line 127.0.0.1 localhost was added, then, add 127.0.0.1 in the address bar to print the above I love my life, I love wangjuan! Because the hosts file is a system file and is a hidden file, you need to modify the folder option to see it. In addition, you need the administrator privilege to modify it.

 

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.