安装sudo apt-get install redis-server
配置远程访问sudo vim /etc/redis/redis.conf
注释这行 前面加上 # 号bind 127.0.0.1 ::1
设置连接密码:requirepass 123456
(千万别用123456,改成强密码)
设置完成,保存后重启redis服务:/etc/init.d/redis-server restart
测试链接redis-cli -a 123456
参考链接:https://blog.csdn.net/smile_Shujie/article/details/90170830
sudo apt-get install mysql-server mysql-common mysql-client
sudo mysql
`select user, plugin from mysql.user;
update mysql.user set authentication_string=PASSWORD('123456'), plugin='mysql_native_password' where user='root';`flush privileges;
exit
sudo systemctl restart mysql
grant all on *.* to [email protected]'%' identified by '123456' with grant option;
flush privileges;
exit
vi /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
按住option键 点击wifi图标即可