Put database names with hyphen characters (-) in backticks (``) to execute querries. Example: GRANT ALL PRIVILEGES ON `database-name`.* TO 'username'@'localhost';