1045, "Access denied for user 'root'#'localhost' (using password: NO)") - mysql

i'm using xampp and vagrant to run my project but whenever i try to makemigration or run the server i got this error
django.db.utils.OperationalError: (1045, "Access denied for user 'root'#'localhost' (using
password: NO)")
here's my connection data
and i'm using vagrant to run my project
full error:
so what's the error?

If you're lauching it from command line, you may have to define env var in that command line (see here)

Related

can't create user on mysql on windows

I just installed MySQL Version 8.0.27 on my windows machine, whenever i try to run MySQL command i get this error
ERROR 1045 (28000): Access denied for user 'ODBC'#'localhost' (using password: NO)
and when i try to run MySQL -u root -p i get this error after specifying password
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
Also i can't locate my.ini file. i was thinking if i should add my.ini file manually or download another version of mysql
I fixed my issue by installing mysql version 5.6.11

mysqlcheck return error message mysqlcheck: Got error: 1045: Access denied for user 'root'#'localhost' (using password: NO) when trying to connect

I am doing mysqlcheck command such as root#com-dev:/var/lib/mysql# mysqlcheck databasedirectory and you would think root will have access to any file system, but it returns this error message not sure what to do.
mysqlcheck: Got error: 1045: Access denied for user 'root'#'localhost'
(using password: NO) when trying to connect
How to overcome this error?
I could not find solution anywhere in the web, so I tried and found this solution: root#com-dev:/var/lib/mysql# mysqlcheck -u root -p databasedirectory You need to pass in username and password of db credentials as options and just as you run mysql command.

MySQL "Access Denied" in xampp v3.2.2

I installed XAMPP and am unable to connect to MySQL to create a password.
When I attempt to connect, I get the error:
Access denied for user 'root'#'localhost' (using password: NO)

mysqlfailover command gives Error 1045: Access denied for user 'root'#'localhost' (using password: NO)

I am trying to run mysqlfailover using workbench console:
mysqlfailover --master=root#localhost:3306 --discover-slaves-login='root' --log=log.txt
and I am getting the error :
ERROR: Cannot connect to the master server.
Error 1045: Access denied for user 'root'#'localhost' (using password: NO)
I tried to google but found nothing.
Mysql version is 5.6.17.
This error is simply saying that user root#localhost is not allowed to execute this command with no password. If you have the password set for root#user modify you command as " mysqlfailover --master=root:YOURMYSQLPASSWORDFORROOT#localhost:3306 --discover-slaves-login='root' --log=log.txt"
This should solve the problem.

zpanel installation - reinstall mysql issue -CentOS-6.4 zpanel-10.1.0

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.