# 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

8 Comments

elf bar bc 5000 · 24/10/2024 at 23:41

… [Trackback]

[…] Find More on to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

saคาสิโน · 26/10/2024 at 12:49

… [Trackback]

[…] Find More on to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

sell drugs · 12/11/2024 at 19:41

… [Trackback]

[…] Read More here on that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

โคมไฟ · 19/11/2024 at 09:27

… [Trackback]

[…] Read More here to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

poker · 28/11/2024 at 03:11

… [Trackback]

[…] Information on that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

bangkok tattoo · 29/11/2024 at 00:48

… [Trackback]

[…] Read More to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

pgslot · 09/12/2024 at 02:51

… [Trackback]

[…] Information on that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

เช่ารถตู้พร้อมคนขับ · 12/12/2024 at 00:59

… [Trackback]

[…] Find More to that Topic: durukanbal.com/2022/03/04/bash-mysql-user-add-and-permission/ […]

Leave a Reply

Avatar placeholder