I would like to run a mysql command using a Powershell but getting an syntax error because of the accent mark (`).
mysql -u root -p -e "GRANT ALL PRIVILEGES ON `testuser\_%` . * TO 'testuser'@'localhost';"
mysql : ERROR at line 1: Unknown command '\_'.
At line:1 char:1
+ mysql -u root -e "GRANT ALL PRIVILEGES ON `testuser\_%`.* TO ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR at line 1: Unknown command '\_'.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Looks like a Powershell confuses this part `testuser\_%` or \_% Any suggestions?
Let MySQL users create databases, but allow access to only their own databases