Create a user in Mysql in linux
login to mysql as a root
mysql -u root -p
now create user with following command
CREATE USER 'testdb'@'localhost' IDENTIFIED BY 'test123';
if you got error like below.
then you have to reset the root password as password policy level in mysql. so simply use the below command to set the password for root in mysql.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root@1234';
then it will show like "Query OK, 0 rows affected (0.00 sec)"
now try again the step to create user as per the password policy.
If you don't want password policy and you want to create user password with some random simple password then follow the step below.
login mysql as root
mysql -u root -p
then check the policy status with below command
SHOW VARIABLES LIKE 'validate_paswword%';
it will show like below image.
you can see the validate_password_policy in MEDIUM.
now you have to change to LOW. So you can proceed in your own way. Now set the paoly rule in low with following command.
SET GLOBAL validat_password_policy=LOW;
now check the password policy like above. You will get like below image.
now you can proceed with your own way of password.
All the Best......
login to mysql as a root
mysql -u root -p
now create user with following command
CREATE USER 'testdb'@'localhost' IDENTIFIED BY 'test123';
if you got error like below.
then you have to reset the root password as password policy level in mysql. so simply use the below command to set the password for root in mysql.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root@1234';
then it will show like "Query OK, 0 rows affected (0.00 sec)"
now try again the step to create user as per the password policy.
If you don't want password policy and you want to create user password with some random simple password then follow the step below.
login mysql as root
mysql -u root -p
then check the policy status with below command
SHOW VARIABLES LIKE 'validate_paswword%';
it will show like below image.
you can see the validate_password_policy in MEDIUM.
now you have to change to LOW. So you can proceed in your own way. Now set the paoly rule in low with following command.
SET GLOBAL validat_password_policy=LOW;
now check the password policy like above. You will get like below image.
now you can proceed with your own way of password.
All the Best......
No comments:
Post a Comment