MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)

I had this problem after changing the password for the root user in phpMyAdmin. I know nothing about programming but I solved it by doing the following: Go to file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php (I guess you would replace “wamp” with the name of your server if you’re not using Wamp Server) Find the line $cfg[‘Servers’][$i][‘password’]=” and change … Read more

MYSQL into outfile “access denied” – but my user has “ALL” access.. and the folder is CHMOD 777

Try executing this SQL command: > grant all privileges on YOUR_DATABASE.* to ‘asdfsdf’@’localhost’ identified by ‘your_password’; > flush privileges; It seems that you are having issues with connecting to the database and not writing to the folder you’re mentioning. Also, make sure you have granted FILE to user ‘asdfsdf’@’localhost’. > GRANT FILE ON *.* TO … Read more

Access denied for user ‘root’@’localhost’ while attempting to grant privileges. How do I grant privileges?

I also had the same problem with this but on Windows after upgrading to MySQL 5.5 from MySQL 5.1. I already tried changing, creating, and resetting password mentioned in here, here, here, and here, no clue. I still get the same error: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES) I’m able … Read more

MySQL – ERROR 1045 – Access denied

If you actually have set a root password and you’ve just lost/forgotten it: Stop MySQL Restart it manually with the skip-grant-tables option: mysqld_safe –skip-grant-tables Now, open a new terminal window and run the MySQL client: mysql -u root Reset the root password manually with this MySQL command: UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=”root”; If you … Read more

How to reset mysql root password?

I summarised my solution here: http://snippets.dzone.com/posts/show/13267 sudo stop mysql sudo mysqld –skip-grant-tables –skip-networking mysql mysql> update mysql.user set password = password(‘your_new_password’) where user=”root”; mysql> flush privileges; mysql> exit; sudo mysqladmin shutdown sudo start mysql

How can I restore the MySQL root user’s full privileges?

If the GRANT ALL doesn’t work, try: Stop mysqld and restart it with the –skip-grant-tables option. Connect to the mysqld server with just: mysql (i.e. no -p option, and username may not be required). Issue the following commands in the mysql client: UPDATE mysql.user SET Grant_priv=’Y’, Super_priv=’Y’ WHERE User=”root”; FLUSH PRIVILEGES; After that, you should … Read more

brew install mysql on macOS

I think one can end up in this position with older versions of mysql already installed. I had the same problem and none of the above solutions worked for me. I fixed it thus: Used brew’s remove & cleanup commands, unloaded the launchctl script, then deleted the mysql directory in /usr/local/var, deleted my existing /etc/my.cnf … Read more

MySQL: Access denied for user ‘test’@’localhost’ (using password: YES) except root user

Do not grant all privileges over all databases to a non-root user, it is not safe (and you already have “root” with that role) GRANT <privileges> ON database.* TO ‘user’@’localhost’ IDENTIFIED BY ‘password’; This statement creates a new user and grants selected privileges to it. I.E.: GRANT INSERT, SELECT, DELETE, UPDATE ON database.* TO ‘user’@’localhost’ … Read more