I am running a Mac OS 10.12.3 and have downloaded the Mysql Server (which runs by clicking "start Mysql server" button), the green light comes on to indicate its running. But when I go over to add a MySQL workbench and try to "set up a new connection" with the following credentials:
Error Screenshot
I get an error message saying:
Failed to Connect to MySQL at 127.0.0.1:3306 with user root
Access denied for user 'root'#'localhost' (using password: YES)
I have gone to terminal and typed in "mysql" and get the same kind of error.
ERROR 1045 (28000): Access denied for user 'leobalboni'#'localhost' (using password: NO)
What am I doing wrong? I want to run the server and upload a database so I can do some exercises. Any help would be grateful.
If it is a fresh install, try reinstalling.
The last time i encountered this problem was because of a missing file/configuration.
Related
I have tried starting the mysql server but unanle to do so. I have changed the password which I am using while connecting to database, other things(hostname, port and username) remained same.
I have already checked mysql service in taskmanager, tried starting from command line and from mysql shell but still not able to succees.
C:\Program Files\MySQL\mysql-8.0.21-winx64\mysql-8.0.21-winx64\bin>mysql -u root -p
Enter password: **************
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
C:\Program Files\MySQL\mysql-8.0.21-winx64\mysql-8.0.21-winx64\bin>mysql start
ERROR 1045 (28000): Access denied for user 'ODBC'#'localhost' (using password: NO)
Any help would be greatly appreciated.
Please find below the screenshots of the error.
cmd_error
taskmanager
workbench1
workbench2
I was facing the same error. I could connect using terminal but not using workbench.
I follow these steps and it worked for me: https://phoenixnap.com/kb/access-denied-for-user-root-localhost
I run this command:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'insert_password';
and then it was possible to access without admin privileges.
Everytime I open the mysql workbench, I see the access denied error 'root'#'localhost'. The below resolution works for me:
Open taskmanager
Go to service tab
Open services
For me, two services run MySQL and MySQL80.
I stop the MySQL service and start the MySQL80 service.
This resolves my issue.
After some google search, I found that there were two services MySQL and MySQL80 running in the services tab of task manager. I stopped the MySQL and started the MySQL80 service. This resolved my issue.
Go to C:/XAMPP/mysql/bin/
open my.ini (configuration setting type file)
under # The mysql server
[mysqld]
add a new line just after above heading and write skip-grant-tables enter image description here
ctrl+s (save)
open XAMPP control panel and click stop if your mysql server is already running and then click start again basically we are restarting the server and boom your problem is solved open workbench and try again to create a new connection.
I'm running a dualboot system on the same ssd(one partition for Ubuntu 19.04, one for windows 10 home 1903). Both currently have MySQL 8.0 installed on them, with the same 'root' user and same password.
Before I installed mysql on ubuntu, I ran a single instance of mysql on Windows 10for my projects perfectly fine(workbench, terminal(cmd, rather) could both connect to root)
Then i installed ubuntu and(stupidly) named the mysql server user as 'root' as well, with the same password.
And now both mysql in both OS refuses to connect with the error:
"Error Nr. 1045 access denied for user 'root'#'localhost' (using password: YES)"
Trying mysql -u root wouldnt work either, throwing the error
"Error Nr. 1045 access denied for user 'root'#'localhost' (using password: NO)"
I'd really love to know why this error occurs and how I could possibly run two instances on two OS's(in the first place when the Ubuntu is shut down that instance isnt running nor listening on 3306 anymore, so why should this error occur?)
Password is definitely correct and the standard google search replies to reset the password didnt change anything either.
Thanks! :)
Did your mysql on Ubuntu and Window shared the same data directory ? Anyway, what worked for me is reinstall mysql on both platforms
I just set up mysql server 8.0 on my local machine. The first time login was fine and I created my database and everything, but since I wanted to load local files so I exited and did mysql -u root -p --local-infile databasename;. When I did that it gave me ERROR 1049 (42000): Unknown database 'databasename;'. Then I tried to login using mysql -u root -p to check the database but I got this error: ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
I tried to restart mysqld but new error message pops up. And I tried to reset the root password it didn't work either.
So I tried to reinstall mysql. The exact same thing happened. The first time login was fine, but when I exit and did --local-infile databasename it said Unknown database 'databasename; again.
Could someone help me with this issue? Thank you! I'm using the widows system.
First I would recommend installing MySQL Workbench, which is the "official" MySQL GUI. It's not that great, but it makes troubleshooting these sort of problems much easier.
Next, If you can actually connect to your localhost instance with workbench, run this:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'yourPasswordHere'
If not, try reinstalling MySQL again and see if you can connect.
When I try to start MySQL via the commandline
shell> mysql
when WAMP is not on (not offline, but simply not starting WAMP at all), I am able to access MySQL:
ERROR 1045 (28000) Access denied for user 'root'#'localhost' (using password: YES)
I have the user and password set in a my.ini file. It works when I turn WAMP on, but doesn't when I exit WAMP. Why is this, and how can I fix it?
I'm guessing that starting up WAMP somehow grants privelegs to 'root'#'localhost'?
I am trying to connect to an appliance that has a mySQL database running on it.
Let us call the appliance APPLIANCE1.
I am trying to connect to the database from SERVER1. SERVER1 has mySQL installed on it.
The command is simple enough:
mysql.exe --host=APPLIANCE --user=name --password=secret
I keep getting the following error:
ERROR 1045 (28000): Access denied for user 'name'#'SERVER1' (using password: YES)
Can anyone shine a light on why it keeps returning the following value: name#SERVER1. Is it not supposed to replace SERVER1 with the host you are trying to connect to?
Much appreciated.
No, it's the host you're connecting from. This allows administrators to allow specific users to only login from specific hosts.