安装:
xampp的安装其实很简单,官网下载一个压缩包,解压到本地目录,执行xampp安装目录下的setup_xampp.bat就安装完毕了。
运行:
xampp的运行也简单,运行安装目录下的控制面板xampp-control.exe,在控制面板上就可以方便的启动和关闭组件了。
配置:
1.解决远程不能访问xampp的问题
打开%xampp%\apache\conf\extra\httpd-xampp.conf 文件。修改成如下(见红色字体):
# Close XAMPP security section herei
<LocationMatch “^/(?i:(?:security))”>
Order deny,allow
Allow from all
#Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
# Close XAMPP sites here
<LocationMatch “^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))”>
Order deny,allow
Allow from all
#Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
2. 解决mysql不能使用IP链接的问题
1) 修改%xampp%\mysql\bin\my.ini文件,搜索
bind-address=”127.0.0.1″
改成
bind-address=”0.0.0.0″
2) 修改%xampp%\phpMyAdmin\config.inc.php文件,搜索:
/* Authentication type and info */
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ”;
$cfg[‘Servers’][$i][‘extension’] = ‘mysql’;
$cfg[‘Servers’][$i][‘AllowNoPassword’] = true;
改成:
/* Authentication type and info */
$cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ‘root’;
$cfg[‘Servers’][$i][‘extension’] = ‘mysql’;
$cfg[‘Servers’][$i][‘AllowNoPassword’] = true;
3) 启动mysql、apache,登录phpMyAdmin。在“权限”部分添加一个root@%用户,内容参照 root@localhost 的设置;两者的区别就是主机字段,一个写%,一个写localhost;
————————————————
版权声明:本文为CSDN博主「雪里风火」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lifxue/article/details/7207343
转载请注明:XAMPP中文组官网 » XAMPP安装配置