I’ve been installing mysql, I enable the service, and activate it.
Then I go the shell and I open
agunet@agunet:~> mysql -u root
Look that ‘agunet@agunet:~>’ is my prompt.
I enter sql and execute the following comands:
SET PASSWORD FOR ‘’@‘localhost’= PASSWORD(‘mypwd’);
SET PASSWORD FOR ‘’@‘agunet’= PASSWORD(‘mypwd’);
Then I execute:
SET PASSWORD FOR ‘root’@‘localhost’= PASSWORD(‘mypwd’);
And when I was typing to type:
SET PASSWORD FOR ‘root’@‘agunet’= PASSWORD(‘mypwd’);
Something happens and screen went blank
NOW I don’t knwo what to do because IF I try to enter via:
mysql -u root
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)
and when I try toe enter:
mysql -u root -p
Enter password
(And after entering te mysql root’s password:
ERROR 1045 (28000) Access denied for user ‘root’@‘localhost’ (using password: YES)
Maybe that password change for root didn’t happen at all or was not written to disk. Try to connect with “mysql -u root -p” and entering an empty password.
If that’s a fresh installation anyway, you could stop mysql, wipe out /var/lib/mysql/, and start mysql again to get back to a fresh installation.
PS: you could also change the root password (and secure the installation in other ways) by running “mysql_secure_installation”.
See also: SDB:MySQL installation - openSUSE Wiki