Skip to main content
added 377 characters in body
Source Link
Super Kai - Kazuya Ito
  • 42.8k
  • 23
  • 258
  • 257

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; 

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'; 

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; 
added 20 characters in body
Source Link
Super Kai - Kazuya Ito
  • 42.8k
  • 23
  • 258
  • 257

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'; 

For example, you can give all privileges on all the tables in only apple database 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'; 

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'; 
deleted 12 characters in body
Source Link
Super Kai - Kazuya Ito
  • 42.8k
  • 23
  • 258
  • 257

For example, you can give all privileges toon all the usertables in only johnapple database to use all the tables in the databaseuser applejohn 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 to use all the tables in all databases with GRANT as shown below:

GRANT ALL ON *.* TO 'john'@'localhost'; 

Or:

GRANT ALL PRIVILEGES ON *.* TO 'john'@'localhost'; 

For example, you can give all privileges to the user john to use all the tables in the database apple 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 to the user john to use all the tables in all databases with GRANT as shown below:

GRANT ALL ON *.* TO 'john'@'localhost'; 

Or:

GRANT ALL PRIVILEGES ON *.* TO 'john'@'localhost'; 

For example, you can give all privileges on all the tables in only apple database 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'; 
added 51 characters in body
Source Link
Super Kai - Kazuya Ito
  • 42.8k
  • 23
  • 258
  • 257
Loading
deleted 24 characters in body
Source Link
Super Kai - Kazuya Ito
  • 42.8k
  • 23
  • 258
  • 257
Loading
Source Link
Super Kai - Kazuya Ito
  • 42.8k
  • 23
  • 258
  • 257
Loading