# User add
mysql -e "CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"
# User GET All Privileges
# ALL PRIVILEGES
# CREATE
# DROP
# DELETE
# INSERT
# SELECT
# UPDATE
# GRANT OPTION
mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"
# Yetki kaldırma
mysql -e "REVOKE SELECT ON database_name.table_name FROM 'newuser'@'localhost';"
# Yetkileri görmek
mysql -e "SHOW GRANTS FOR 'newuser'@'localhost';"
# Yenileme reload
mysql -e "FLUSH PRIVILEGES;"
# User silmek
mysql -e "DROP USER 'newuser'@'localhost';"
Categories: Bash language
3 Comments
กายภาพ รามอินทรา · 02/09/2026 at 16:31
… [Trackback]
[…] Find More on to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]
ร้านต่อผม · 08/09/2026 at 01:23
… [Trackback]
[…] Find More here to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]
ข่าวเกม · 16/09/2026 at 00:48
… [Trackback]
[…] Find More on on that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]