• 阿里云配置mysql navcat远程连接


    默认是不能用客户端远程连接的,阿里云提供的help.docx里面做了设置说明,mysql密码默认存放在/alidata/account.log

    首先登录: mysql -u root -h localhost -p

    use mysql                #打开mysql数据库

    #将host设置为%表示任何ip都能连接mysql,当然您也可以将host指定为某个ip

         update user set host='%' where user='root' and host='localhost';

         flush privileges;        #刷新权限表,使配置生效

         然后我们就能远程连接我们的mysql了。

    3、如果您想关闭远程连接,恢复mysql的默认设置(只能本地连接),您可以通过以下步骤操作:

         use mysql                #打开mysql数据库

         #将host设置为localhost表示只能本地连接mysql

         update user set host='localhost' where user='root';

         flush privileges;        #刷新权限表,使配置生效

    备注:您也可以添加一个用户名为yuancheng,密码为123456,权限为%(表示任意ip都能连接)的远程连接用户。命令参考如下:

         grant all on *.* to 'yuancheng'@'%' identified by '123456';

         flush privileges;

    转自http://my.oschina.net/ecnu/blog/295304

  • 相关阅读:
    UVA247 电话圈 Calling Circles
    Python开发之路
    Day 8-模块
    Homework
    Day 7- 装饰器
    Day 6-文件操作的其他方法 迭代器 生成器
    数据-进制
    Day 5-变量与高阶函数
    Day 4-集合、百分号拼接及函数
    Day 3-Python列表、元祖、词典
  • 原文地址:https://www.cnblogs.com/shanheyongmu/p/6110264.html
Copyright © 2020-2023  润新知