ssh root@ip "mysql -uroot -p -e 'grant all on wordpress.* to firaswp@'ip' identified by 'password123';'"
however, when I input grant all on wordpress.* to firaswp@'54.87.224.199' identified by 'password123'; in mysql daemon it works fine..
does anyone know why this wouldn't be working? the syntax should be fine - if i remove "identified by 'password123', it works. Thanks!
I am using this, and it works for me:
ssh root@ip "mysql --user=user --password=pass database -e 'query'"
Your script also look working but don't use ;
in command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.