Skip to content

Instantly share code, notes, and snippets.

@rkcb
Last active December 27, 2018 18:22
Show Gist options
  • Select an option

  • Save rkcb/3687c9b27ccc7ce9ab60ddf059c091f6 to your computer and use it in GitHub Desktop.

Select an option

Save rkcb/3687c9b27ccc7ce9ab60ddf059c091f6 to your computer and use it in GitHub Desktop.

Useful links

Stop mariadb server on Ubuntu 18.04

sudo service mariadb stop

Grant "root" rights for escobar in the database mydb

GRANT ALL PRIVILEGES ON mydb.* to 'escobar'@'localhost' WITH GRANT OPTION;

Show grants for the current user

SHOW GRANTS;

Show grants for a user

SHOW GRANTS FOR 'escobar'@'localhost';

Show users

SELECT User FROM mysql.user;

For reseting the password for 'root' see

https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password

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