For example, you can give all privileges on all the tables in only apple database (apple.*) to the user john with GRANT as shown below. *You probably need to log in with the user root:
GRANT ALL ON apple.* TO 'john'@'localhost'; Or:
GRANT ALL PRIVILEGES ON apple.* TO 'john'@'localhost'; In addition, you can give all privileges on all the tables in all databases (*.*) to the user john with GRANT as shown below:
GRANT ALL ON *.* TO 'john'@'localhost'; Or:
GRANT ALL PRIVILEGES ON *.* TO 'john'@'localhost'; And, you can create the superuser john which can do everything same as the default user root with GRANT as shown below. *MySQL has SUPER privilege but it is not the one to create the superuser:
GRANT ALL ON *.* TO 'john'@'localhost' WITH GRANT OPTION; Or:
GRANT ALL PRIVILEGES ON *.* TO 'john'@'localhost' WITH GRANT OPTION;