Mysql database common commands

reference https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

MySQL

admin login 

grant privileges 

# only allow local
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
# all ip
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%';
FLUSH PRIVILEGES;

practical usage example
grant select on post to scrapy;
grant insert on post to scrapy; 
flush privileges;


Leave a Reply

Your email address will not be published.

Notice: Undefined index: cookies in /var/www/html/wp-content/plugins/live-composer-page-builder/modules/tp-comments-form/module.php on line 1638