Jump to content

D.B.

Members
  • Posts

    4
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by D.B.

  1. Yes, I log in to MYSQL COMMAND LINE CLIENT using that password. After that ,I typed  'select current_user;' and got the output:

    +----------------+
    | current_user   |
    +----------------+
    | root@localhost |
    +----------------+

    which means the password I use to login is of root account and host is localhost.

  2. I am trying to connect mysql(8.0) and python(3.8) using mysql.connector but getting the error:

    mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Windows 10

    The code is:

    import mysql.connector

    con=mysql.connector.connect(host='localhost',user='root',passwd='12345',database='empl')

    same code properly working with pymysql.connect and sqlalchemy's create_engine.

    kindly see the image attached

    kindly reply soon as i need to complete it for a project urgently.

    pythonneed.png

×
×
  • Create New...