Ask Your Question

Revision history [back]

I am not sure if this will work, but as the mariadb server gave error (using password: NO) you must first enter the root user and create a password for the same.

$ MySQL -u root

This shouldn't ask for password but if it does try leaving it blank. You should be into the root MySQL user

MYSQL> Try the following commands to change password: update user set password=PASSWORD("NEWPASSWORD") where User='root';

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

Note: 'MyNewPass' should be your password in plain text.

I am not sure if this will work, but as the mariadb server gave error (using password: NO) you must first enter the root user and create a password for the same.

$ MySQL -u root

This shouldn't ask for password but if it does try leaving it blank. You should be into the root MySQL user

MYSQL> MYSQL>

Try the following commands to change password: password:

update user set password=PASSWORD("NEWPASSWORD") where User='root';

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

Note: 'MyNewPass' should be your password in plain text.