Whenever I install mysql on macOS I get this error while starting it
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO)
I have tried the password which I got during the installation. The error then is :
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
I have also tried using root as a password or completely letting it blank but none of this worked
NOTE: I am using mysql using the MAMP setup and it is running just fine there.
It is located at:
/Applications/MAMP/Library/bin/mysql
I am able to run as root from there. Is it due to I am trying to run as root from two places? Please help me out.
Related
I have tried almost all related problems to this problem, but they all weren't working for me.
It's my first time installing mysql onto my arch linux and it keeps asking me for root password as I don't have one.
It was happening because I wasn't running my terminal in root..
I changed to root user and run the command and everything worked
I need help. When Checking mySQL version I get this error. I do not use mysql a lot and I am trying to set up a Magento store through command line. However, first I am trying to set up mySql from the database. I am using Mac OS Catalina and Zsh terminal.
Error.
mysql -v
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO)
I know it must be something with my database but I am confused. Any help would be appreciated. When I try to download Magento 2 setup install I get this similar error.
--db-user=root --admin-firstname=Magento --admin-lastname=User --admin-email=user#example.com --admin-user=admin --admin-password=123123q --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost' (using password: NO)
In InstallCommand.php line 264:
Parameter validation failed
EDIT: However, When I connect to mysql -u root I can connect to the database no problem.
You need to pass in the user and password when running mysql from the command line
mysql -u root -p
[enter password]
Alternatively, you can set up a mylogin.cnf (or a .my.cnf) to save the user/password as a file, so you don't need to remember it.
https://dba.stackexchange.com/questions/86595/how-can-i-make-mysql-client-read-password-from-mylogin-cnf
I just installed MySQL on my pc using tutorial on the YouTube every thing set to default options during the installation the tutorial said that after the installation done I should open the MySQL 8.0 commend line client and then I should type the password to connect the database but when I open it and after I type my password it's close when I press enter so I tried to use the work MySQL workbench it's gives me this popup error I search on the internet for solution I got this here but this solution for ubuntu none of the answers are not applicable on windows but some other solution gives me some other errors :
C:\Users\husam>mysql -u root -p
Enter password: ***************
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
C:\Users\husam>mysql
ERROR 1045 (28000): Access denied for user 'ODBC'#'localhost' (using password: NO)
I want to use the MySQL with ruby on rails project on windows 10
the issue wan in my password it's contain ' so I removed it and everything works fine
I installed MySQL on my Mac following the guide at https://dev.mysql.com/doc/refman/5.6/en/osx-installation-pkg.html
Then I downloaded MySQL and tried to connect to it, but I got the error:
I have tried to reset the root password as mentioned in Stuck with Access Denied for user 'root'#'localhost' - Terminal, Mac but it does not help.
I have tried to install zpanel 10.1.0 on centos 6.4 on own server machine.
The requirement was fresh clean OS installation.
Ref:Here
But it is late for me since I already installed several pacages like LAMP stack,etc..
ISSUE:
As per the instructions I downloaded the installer script,Execute.
FYI:This script installs all the dependencies for the installation.
I already have mysql installed along with LAMP stack,With
$ mysql_secure_installation
This installer script tries to access the existing mysql.It fails since it generates its own root password since it assumes this system is fresh install OS.
So I uninstalled all mysql related stuff's like mysql-server,libs.etc..But still it fails at same place.
ErrorLog:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'#'localhost' (using password: NO)'
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
While Checking mysql from console I found that mysql root password is the same that I set while Lamp stack installation despite of several re installation.
This result in application without database access.
Looking for any advice here to get this solved.
Thanks.
Sorry for long post.
I found a (dirty) way to do that from here and there
simply remove the mysql directory itself from /var/libs/mysql after uninstalling your mysql packages.
rm -fR /var/libs/mysql
then execute the installer as usual. My issue solved this way. Thank you.