database - can't login to any account in mysql -
i installed mysql on mac , can't seem access accounts there.
i used commands :
shell> mysql -u root -p password:
and since have not given 1 let go blank , error saying incorrect password.
i can login using
shell> mysql
buy can't seem able change passwords or @ accounts in mysql.users.
i following error:
error 1142 (42000): select command denied user ''@'localhost' table 'users'
what do resolve issue , how use software sequel pro database?
your problem seems, dont have privileges localhost@root, privileges run below command.
mysql> grant privileges on *.* root@localhost identified 'password' grant option
in mysql command prompt , have previleges access localhost root.
use command set password mysql
mysqladmin -u root password “newpassword”;
example mysqladmin -u root password adhfhuef34;
you want restart database server after running command
sudo /etc/init.d/mysql restart
if dint work, try
$ mysql -u root mysql> use mysql; mysql> update user set password=password("newpassword") user='root'; mysql> flush privileges; mysql> quit
Comments
Post a Comment