Skip to content

Instantly share code, notes, and snippets.

@ramingar
Last active April 19, 2021 11:00
Show Gist options
  • Select an option

  • Save ramingar/c17f420b35d08cc3e874 to your computer and use it in GitHub Desktop.

Select an option

Save ramingar/c17f420b35d08cc3e874 to your computer and use it in GitHub Desktop.
Conceder permisos a un usuario en una BBDD mysql #database #mysql #grant #permission
grant all on crud.* to 'usuario'@'localhost' [with grant privileges];
flush privileges;
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
FLUSH PRIVILEGES
CREATE USER 'nombre_usuario'@'localhost' IDENTIFIED BY 'tu_contrasena' [WITH GRANT OPTION];
CREATE USER 'nombre_usuario'@'%' IDENTIFIED BY 'tu_contrasena' [WITH GRANT OPTION];
GRANT ALL PRIVILEGES ON * . * TO 'nombre_usuario'@'localhost';
GRANT ALL PRIVILEGES ON * . * TO 'nombre_usuario'@'%';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment