XAMPP on windows 7 not working properly

て烟熏妆下的殇ゞ 提交于 2019-12-10 16:32:29

问题


I just installed XAMPP lite on Windows 7. I have two drives - C: for the OS and regular files, and an external drive E:. I installed XAMPP lite on E: (on the root), and its been giving me problems. Apache works well enough, but MySQL doesn't work. When I go to http://localhost/phpmyadmin/, it gives me the following error:

Error

MySQL said: 
#2003 - Can't connect to MySQL server on 'localhost' (10061)
Connection for controluser as defined in your configuration failed.

Any ideas as to what could be the problem? I used the zip file for XAMPP lite, the 32 bit version. This is on Windows 7 Home premium.

Thanks!


回答1:


This happened to me today, and it was because Dropbox.exe was using port 3306. If you run the Port-Check from XAMPP control panel, you will be able to see if there are any conflicting port issues.




回答2:


You need to actually start the MySQL database server.

Start the XAMPP Control Panel and click the "Start" button just to the right of where it says MySQL. (Or run the "mysql_start" batch file)




回答3:


Please edit your config.inc.php file in phpmyadmin subfolder inside xampp's installation, and specify '127.0.0.1' (instead of any other value like 'localhost) for the $cfg['Servers'][$i]['host'] setting as follows:

$cfg['Servers'][$i]['host'] = '127.0.0.1'; 

Then try with:

http://127.0.0.1/phpmyadmin

and it should work (at least it worked for me and I had exactly the same problem).

If this doesn't work you can try solutions described here:

http://forums.mysql.com/read.php?35,64808,254785#msg-254785

OR:

you can leava the setting mentioned above as:

$cfg['Servers'][$i]['host'] = 'localhost'; 

and edit %windir%\system32\drivers\etc\hosts adding the line (if it doesn't already exist):

127.0.0.1       localhost

Please note: I am using xampp beta which you can find here: http://www.apachefriends.org/en/xampp-beta.html

EDIT: Recently I have found this link http://www.ihostnz.com/howto-install-xampp-windows-7-xdebug-netbeans, followed the instructions there and now everything works like a breeze.




回答4:


Sometimes I get this error:

ERROR: MySql service not started [-1]

when installing XAMPP on developers' machines (Windows-based), because often developers already have a MySql installation on their computers. MySql installs itself as service with the default name "MySql"; XAMPP uses this name too for his own MySql, it gets confused. So, my solution is:

  • remove existing "MySql" service, the one created by the MySql installer;
  • re-add it with a new name (not "MySql")
  • use XAMPP happily :)

Here is a more general article (in italian language, but you should figure it out): XAMPP: cosa fare quando qualche servizio non parte (Windows)




回答5:


just go to the xampp folder then phpmyadmin folder. here u will see a user_password.php file. just make the password null



来源:https://stackoverflow.com/questions/2939510/xampp-on-windows-7-not-working-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!