Support Questions
Find answers, ask questions, and share your expertise

MYSQL.CONNECTOR ISSUE

New Contributor

I AM TRYING TO CONNECT MYSQL(8.0) AND PYTHON(3.8) USING MYSQL.CONNECTOR 8.0.25 BUT GETTING THE ERROR: mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
WINDOWS 10
code used:

import mysql.connector 
con=mysql.connector.connect(host='localhost',username='root',password='<correctpassword>',database='empl')


Database exists and password used is the one which is used to login to mysql command line client.Same code working with pymysql and sqlalchemy's create engine without any error.
Kindly help me out solve it for my project work.

1 REPLY 1

Re: MYSQL.CONNECTOR ISSUE

Community Manager

@DB12345 I'm not an expert but have you checked some of the existing solutions on this error message?

https://community.cloudera.com/t5/Support-Questions/how-to-access-mysql-in-hadoop-VM-from-host-machi... 

 

https://community.cloudera.com/t5/Support-Questions/NO-able-to-connect-to-metastore-mysql-database/m... 


Cy Jervis, Manager, Community Program

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:
Community Guidelines
How to use the forum