当前位置:网站首页>mysql8设置远程连接
mysql8设置远程连接
2022-08-08 20:54:00 【Chise1】
记录一下,免得吐血
apt update
apt install mysql
mysql
#建议:不要把root账户共享出去,密码设置必须有大写英语字母、小写英语字母、特殊符号、数字
mysql> use mysql;
mysql> create user '账户名称'@'%' identified by '密码';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO '账户名称'@'%';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
#修改mysql配置文件
vim /etc/mysql/mysql.conf.d/mysqld.cnf
#将里面的bind-address = 127.0.0.1注释掉
#然后 重启
service mysql restart
#别忘了开启阿里云的3306端口
边栏推荐
猜你喜欢
随机推荐
Flask 教程 第十三章:国际化和本地化
Process实现守护线程
【翻译】宣布Kubernetes策略管理论文
Mysql管理指令
Kotlin parsing String path knowledge
Categorized input and output, Go lang1.18 introductory refining tutorial, from Bai Ding to Hongru, go lang basic data types and input and output EP03
Gradle is as simple as using kotlin to write common commands
PHP传递任意数量的函数参数
记录非Gui模式Jmeter使用
Flask 教程 第三章:Web表单
Kotlin学习笔记
各类测试场景的检查点
单片机--IIC总线篇
C语言初阶-指针
AtCoder Beginner Contest 263(A~F)
nacos作用
Kotlin实用的一些框架
Flask 教程 第十章:邮件支持
Protobuf框架与WebAPI
IO in Kotlin flow