Mysql: Difference between revisions
From AWVVO
Jump to navigationJump to search
Created page with "== Create user ==" |
|||
Line 1: | Line 1: | ||
== Create user == | == Create user == | ||
<syntaxhighlight lang="SQL" copy> | |||
CREATE USER 'username'@'host' IDENTIFIED BY 'password'; | |||
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'host'; | |||
FLUSH PRIVILEGES; | |||
SHOW GRANTS FOR 'newuser'@'localhost'; | |||
</syntaxhighlight> |
Latest revision as of 06:40, 18 January 2025
Create user
CREATE USER 'username'@'host' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'host';
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'newuser'@'localhost';