被一个小朋友问到,直接公布答案:

If your MySQL client/server version is a 5.6.x a way to avoid the WARNING message are using the mysql_config_editor tools:

mysql_config_editor set --login-path=local --host=localhost --user=username --password

Then you can use in your shell script:

mysql --login-path=local -e "statement"

instead of:

mysql -u username -p pass -e "statement"

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-09-20
  • 2022-02-24
  • 2021-10-09
  • 2022-12-23
猜你喜欢
  • 2021-12-30
  • 2021-10-07
  • 2022-02-20
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案