I edited deian.cnf to change the password of mysql (ubuntu server)
sudo vi /etc/mysql/debian.cnf
I change
user=debian-sys-maint password=*
to
user=debian-sys-maint
password=mypassword
then I tried to enter console of mysql
mysql -udebian-sys-maint -p
and inputed password 'mypassword'
it reported
mysql error 1045(280000) access denied for user 'debian-sys-maint '@' localhost using password 'yes'
I tried to remove mysql and reinstall, the error is same.
Your comment welcome
Best Answer
The error message tell you that, your password is wrong or the account
debian-sys-maint
has no access to the database on hostlocalhost
.If you are sure your password is correct you should grant all privileges like this:
login as root first
then, grant full permissions:
restart mysql and see if the error message is gone.