我需要运行此命令来授予用户权限。我从mysql客户端做了命令,但它无法工作。
mysql -u'user' -p'password' -h'10.10.10.8' -e "GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD 'B2DD25340A1A8A4856A5399F0B';"
答案 0 :(得分:0)
使用反斜杠来逃避双引号中的单引号:
mysql -u'user' -p'password' -h'10.10.10.8' -e "GRANT USAGE ON *.* TO \'user\'@\'localhost\' IDENTIFIED BY PASSWORD \'B2DD25340A1A8A4856A5399F0B\';"