phpstudy8.1安装与配置

环境:

window10
phpstudy8.1.1.3
Vmware安装centos7.6

使用场景

window10安装mysql和redis
在Vmware安装centos7.6 桥接模式上网
centos7.6连接mysql和redis
mysql和redis开启远程登陆权限
在centos里访问物理机的ip地址

查看物理机ip地址

D:\phpstudy_pro\Extensions\MySQL5.7.26\bin>ipconfig
无线局域网适配器 WLAN:

   连接特定的 DNS 后缀 . . . . . . . :
   本地链接 IPv6 地址. . . . . . . . : fe80::b5d9:27af:ae4e:497f%10
   IPv4 地址 . . . . . . . . . . . . : 192.168.0.109
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . : 192.168.0.1

软件下载

https://www.xp.cn/

开启mysql和redis

image

mysql设置密码:

image

设置mysql远程登陆权限

C:\Users\Administrator>d:
C:\Users\Administrator>cd D:\phpstudy_pro\Extensions\MySQL5.7.26\bin
D:\phpstudy_pro\Extensions\MySQL5.7.26\bin>mysql.exe -uroot -p123456
mysql> grant all privileges on *.* to root@"%" identified by "123456" with grant option;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye

设置redis远程登陆权限

注释:bind 127.0.0.1

image

image

#bind 127.0.0.1
port 6379
timeout 65
maxclients 10000
databases 16
maxmemory 1048576000

尝试连接

在linux系统里telnet一下试物理主机里的3306端口和6379端口试试

linux里安装telnet

[root@HmEduCentos01 ~]# yum install -y telnet

linux里连接mysql

[root@HmEduCentos01 ~]# telnet 192.168.0.109 3306
Trying 192.168.0.109...
Connected to 192.168.0.109.
Escape character is '^]'.
J
5.7.26
      140AsK�ys7'V"qC,5[mysql_native_passwordConnection closed by foreign host.

已经通了,输入 ctrl+] 再输入 quit 回车退出

linux连接redis

[root@HmEduCentos01 ~]# telnet 192.168.0.109 6379
Trying 192.168.0.109...
Connected to 192.168.0.109.
Escape character is '^]'.
已经通了,输入 ctrl+] 再输入 quit 回车退出
posted @   HaimaBlog  阅读(573)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
历史上的今天:
2020-05-22 Golang、python中MD5、SHA512、base64编码等
2020-05-22 js操作数组 Echarts的使用
点击右上角即可分享
微信分享提示