MYSQL处理不准许外边链接的问题
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">root登录进去执行以下命令<span style="color: black;">就可</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;">use mysql;
update user set host = % where user = root;
FLUSH PRIVILEGES;</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">授权法</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在安装mysql的<span style="color: black;">设备</span>上运行mysql的客户端 :MySQL 8.0 Command Line Client</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1、mysql> use mysql;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">//<span style="color: black;">这般</span>应该<span style="color: black;">能够</span>进入MySQL服务器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2、mysql> ALTER USER root@% IDENTIFIED BY 123456 PASSWORD EXPIRE NEVER;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">//% <span style="color: black;">暗示</span> 赋予任何主机<span style="color: black;">拜访</span>数据的权限,例如,你想 root <span style="color: black;">运用</span> password 从任何主机连接到mysql服务器的话,<span style="color: black;">倘若</span>想<span style="color: black;">运用</span>指定的IP来连接mysql的话,只<span style="color: black;">必须</span>把%改成对应的ip<span style="color: black;">就可</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3、mysql> ALTER USER root@% IDENTIFIED with mysql_native_password by 123456;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4、mysql> ALTER USER root@% IDENTIFIED with mysql_native_password by 123456;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">5、mysql> flush privileges;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">6、mysql>EXIT</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">退出MySQL服务器,<span style="color: black;">这般</span>就<span style="color: black;">能够</span>在其它任何的主机上以root身份登录</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下面是截图:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">mysql> use mysql;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Database changed</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">mysql> ALTER USER root@% IDENTIFIED BY 123456 PASSWORD EXPIRE NEVER;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Query OK, 0 rows affected (0.01 sec)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">mysql> ALTER USER root@% IDENTIFIED with mysql_native_password by 123456;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Query OK, 0 rows affected (0.03 sec)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">mysql> flush privileges;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Query OK, 0 rows affected (0.01 sec)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">————————————————</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">版权声明:本文为CSDN博主「LongtengGensSupreme」的原创<span style="color: black;">文案</span>,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">原文链接:<a style="color: black;"><span style="color: black;">https://</span><span style="color: black;">blog.csdn.net/LongtengG</span><span style="color: black;">ensSupreme/article/de</span></a>tails/104972406</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic3.zhimg.com/80/v2-406939b3a88b0040089865e71724a7e2_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">新手耗时8个小时<span style="color: black;">处理</span>,太难了</p>
你的话语如春风拂面,让我感到无比温暖。 楼主节操掉了,还不快捡起来! 我赞同你的看法,你的智慧让人佩服,谢谢分享。
页:
[1]