• mysql 5.6在命令行操作数据库时出现:Warning: Using a password on the command line interface can be insecure.


    正常在命令操作mysql 5.6数据库时像下面这样:

    mysql -uroot -p123456 -e "show slave statusG"
    

     会报: Warning: Using a password on the command line interface can be insecure.

    如果仅仅是这样的话,我们只要不输入密码回车再输入密码就可以了,但在shell脚本中就不能这样操作

    下面就是在脚本中的写法:

    mysql --login-path=local -e "show slave statusG"
    

    前提是在/etc/my.cnf的【mysql】里面添加了

    user=root
    password=123456
    host=localhost
    

      

    对于一个有思想的人来说,没有地方是荒凉而遥远的
  • 相关阅读:
    LeetCode 260
    LeetCode 258
    LeetCode 237
    LeetCode 226
    LeetCode 203
    LeetCode 202
    codeforces 7D
    codefroces 7C
    codeforces 7B
    codeforces 6E (非原创)
  • 原文地址:https://www.cnblogs.com/quanag/p/9139709.html
Copyright © 2020-2023  润新知