Menambahkan super user di mysql

CREATING ANOTHER SUPER USER

Login ke mysql dengan akses root :
sudo mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
While not particularly secure, in some cases you may wish to create another ‘super user’, that has ALL privileges across ALL databases on the server. That can be performed similar to above, but by replacing the database_name with the wildcard asterisk:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%';
Now username has the same privileges as the default root account, beware!

SAVING YOUR CHANGES

As a final step following any updates to the user privileges, be sure to save the changes by issuing the FLUSH PRIVILEGES command from the mysql prompt:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)


Menambahkan super user di mysql Menambahkan super user di mysql Reviewed by ilham.sp on July 09, 2018 Rating: 5

No comments:

Notice

This site uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.Learn More

Powered by Blogger.