WampServer3.0.6的安装配置

1.WampServer:window+apache+mysql+php的版本信息
wampserver3.0.6_x64_apache2.4.23_mysql5.7.14_php5.6.25-7.0.10
安装在F:wamp64目录下。

2.关于WampServer的服务控制面板的修改
  1)自定义网站根目录:
    http.conf文件和httpd-vhosts.conf下找到DocumentRoot:
      DocumentRoot "${INSTALL_DIR}/www"     修改为:DocumentRoot "你想要的路径"  
      <Directory "${INSTALL_DIR}/www/">     修改为:<Directory "你想要的路径">
    新版本的WampServer的配置文件,提供了很多全局定义的默认配置!就相当于把上述的配置做如下修改:
      DocumentRoot "${INSTALL_DIR}/www"     修改为:DocumentRoot "${INSTALL_DIR}/Demo"  
      <Directory "${INSTALL_DIR}/www/">     修改为:<Directory "${INSTALL_DIR}/Demo">
    在http.conf文件中关于${INSTALL_DIR}的值为WampServer的安装目录F:wamp64。修改的这两个地方。其实就是网站根目录,即网站项目的存放的地方。


    当然WampServer服务控制面板也要做相应的修改:wampmanager.ini和wampmanager.tpl。
      更改wampmanager.ini文件中[Menu.Left]标记中Type: item; Caption: "www Directory";Action: shellexecute; FileName: "F:/wamp/www";
      这一句中的Caption值"www Directory"为"Demo",并更改FileName值"F:/wamp/Demo"为目标文件夹,也就是你想要的路径。

      更改wampmanager.tpl文件中[Menu.Left]标记中Type: item; Caption: "${w_wwwDirectory}";    Action: shellexecute; FileName: "${wwwDir}";
      这一句中的Caption值 "${w_wwwDirectory}"为"Demo",更改FileName值"${wwwDir}"为"F:/wamp/Demo"为目标文件夹,也就是你想要的路径。
      关于${wwwDir}还可以在F:wamp64scripts的config.inc.php中找到!
  2)WampServer多站点配置:
    http.conf文件中引入httpd-vhosts.conf文件:即#include conf/extra/httpd-vhosts.conf,将#符号去掉。
    打开httpd-vhosts.conf:添加域名和路径,即ServerName和DocumentRoot。    

<VirtualHost *:80>
    ServerName test01.com
    DocumentRoot F:/wamp64/Demo/test01
    <Directory  "F:/wamp64/Demo/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>
<VirtualHost *:80>
    ServerName test02.com
    DocumentRoot F:/wamp64/Demo/test02
    <Directory  "F:/wamp64/Demo/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>        

    在路径中写index.php等验证文件,如果为其他名字test.php,需在http.conf文件中dir_module中添加test.php
    最后在C:windowsSystem32driversetchosts文件中添加域名
      127.0.0.1 test01.com
      127.0.0.1 test02.com

   3)自拟定端口号
    打开http.conf文件,找到Listen 80 和 ServerName localhost:80,apache默认端口号为80,若被占用,可以修改为其他如8080端口等。

3.一打开phpMyAdmin,就在开头界面中修改了密码。如下:

  phpMyAdmin:密码:6fXQkbuLCmyxLpfj   即123456的Native MySQL authentication编码。
  修改phpMyAdmin密码的SQL语句:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '***' 。


  通过上面的方法修改密码后:mysql数据库中的user表的password字段会变成authentication_string。所以你再次使用密码登录时会出现问题。

  解决办法:
    这个时候就需要跳过权限进入数据库了,可以通过命令mysqld --skip-grant-tables,也可以在my.ini配置文件中的[mysqld]中添加skip-grant-tables。
    通过上述命令或者配置,就可以无密码登录进mysql中了。
    然后通过如下语句修改密码:update mysql.user set authentication_string=password('修改的密码') where user='root';
    修改完flush privileges刷新权限,或在my.ini配置文件中的[mysqld]中删除skip-grant-tables。退出就可以了。

  上述情况中,如果碰到mysql服务不能开启或者是wampmysql64服务不能开启,这会导致WampServer一直是黄色。
  解决办法就是:将wamp64inmysqlmysql5.7.14data下的ib_logfile0,ib_logfile1等往下的所有文件删除,
  并将my.ini的log-bin=mysql-bin这条语句注释掉,net start wampmysql64 重启服务就好了。


   

原文地址:https://www.cnblogs.com/laining/p/7447912.html