如何在MySQL/MariaDB中创建与root具有相同特权的用户? [英] How do I create a user with the same privileges as root in MySQL/MariaDB?
本文介绍了如何在MySQL/MariaDB中创建与root具有相同特权的用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在MySQL/MariaDB中创建与root用户具有相同特权的用户?
How do I create a user with the same privileges as root in MySQL/MariaDB?.
推荐答案
% mysql --user=root mysql
CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;
CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' WITH GRANT OPTION;
CREATE USER 'admin'@'localhost';
GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
CREATE USER 'dummy'@'localhost';
FLUSH PRIVILEGES;
这篇关于如何在MySQL/MariaDB中创建与root具有相同特权的用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文