I am working on a project and I have been trying to use MySQL instead of SQLite. So I downloaded MySQL and I am trying to set the root password with
mysql_secure_installation, but when I submit both passwords, it gives the following error:
... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.
I have been trying to set the password in mysql by doing:
$ sudo mysql -u root
mysql> SET PASSWORD FOR 'root' = PASSWORD('new_password');
update user set authentication_string=password("password") where user='root';
But then it gives syntax errors.
How can I solve this?
EDIT: One of the problems I have now is that I need the root password to connect to the MySQL server, leaving it empty didn't seem to work