Skip to content

Instantly share code, notes, and snippets.

@hpatoio
Last active March 15, 2021 02:46
Show Gist options
  • Save hpatoio/4398399 to your computer and use it in GitHub Desktop.
Save hpatoio/4398399 to your computer and use it in GitHub Desktop.
Create a MySQL database and create a user with all grant on it
CREATE USER 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD';
GRANT USAGE ON * . * TO 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `DB_USERNAME` ;
GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'localhost';
#For connection from everywhere
GRANT USAGE ON * . * TO 'DB_USERNAME'@'%' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'%';
@Santa-Maria-de-Cayon
Copy link

Santa-Maria-de-Cayon commented Sep 2, 2020

how I use this command witch symfony doctrine, because I have this error max_connections_per_hour ?¿?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment