How to create a new user and manage permissions in MySQL?
PreviousHow to create a CLI with Python Fire on Ubuntu 22.04?NextHow to create an instance with Terraform?
Last updated
Last updated
sudo mysqlSELECT user,authentication_string,plugin,host FROM mysql.user;ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';SELECT user,authentication_string,plugin,host FROM mysql.user;sudo mysqlmysql -u root -pCREATE USER 'john'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'your_password';ALTER USER 'john'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';GRANT ALL PRIVILEGES ON *.* TO 'john'@'localhost' WITH GRANT OPTION;exit