MySQL Cookbook

Administration Commands

Grant database privileges for a user

GRANT ALL ON example_database.* TO 'example_user'@'%' WITH GRANT OPTION;

Disable primary key requirement

SET GLOBAL sql_require_primary_key = 0;

Error debugging:

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation

Install MySQL Client Tools

For Ubuntu/Debian

sudo apt update
sudo apt install mysql-client -y
Error debugging
E: Package 'mysql-client' has no installation candidate

Solution:

sudo apt update
sudo apt install maria-client -y