Skip to content

DocTam/Wnmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wnmp by DocTam

在 Windows 上运行 NGINX、MySQL 和 PHP

使用

① 分别进入 mysqlphpnginx 目录,按照说明进行安装(Windows XP/2003 系统下最高支持版本为 mysql-5.6.20 php-5.4.31 phpmyadmin-4.2.7

② 运行 .\Bin\WebStart.Bat 启动环境

③ 浏览器访问 http://localhost/,出现 400 Bad Request 说明 Nignx 配置正常

④ 再次访问 http://localhost/index.php,出现 phpinfo 信息说明 PHP 配置正常

⑤ 访问 http://localhost/test.php,出现 Connected successfully 说明数据库配置正常(默认账号:root;默认密码:root;或空密码)

⑥ 访问 http://localhost/phpmyadmin,出现 phpmyadmin 登录界面说明 phpmyadmin 配置正常

⑦ 运行 .\Bin\WebStart.Bat 重启环境或运行 .\Bin\WebStop.Bat 停止环境

更改 MySQL 账号 root 的默认密码

① 报错提示:Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) ;原因:密码为空密码。

② 修改 my.ini 配置文件,在 [mysqld] 这个条目下加入 skip-grant-tables 后重启 mysql

③ Cmd 登录 MySQL 控制台: mysql -u root -p

④ mysql> use mysql;update user set password=password("新密码") where user="root";flush privileges;quit;

⑤ 修改 my.ini 配置文件,在 [mysqld] 这个条目下删除 skip-grant-tables

全局变量

如果要在其他地方使用 mysqlphpnginx,可以将其加入环境变量

打开控制面板,在搜索栏输入 环境变量,点击 编辑账户的环境变量,选中 path,点击编辑,点击新建,加入如下 3 条:

当前目录\mysql\版本号

当前目录\php\版本号

当前目录\nginx\版本号

协议

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors