0

trying to create a table on server in pycharm using mysql

    import mysql.connector
db = mysql.connector.connect(
    host='localhost',
    user='root',
    passwd='root',
    database='Local instance MySQL80',
    auth_plugin='mysql_native_password'
)

mycursor = db.cursor()

mycursor.execute('CREATE TABLE Shirt(name VARCHAR(50),price smallint, size smallint, serialnumber int PRIMARY KEY AUTO_INCREMENT)')

but keep getting the same error

mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported
  • U can try this https://stackoverflow.com/questions/50557234/authentication-plugin-caching-sha2-password-is-not-supported – pepper Jun 15 '21 at 01:29

1 Answers1

0

You installed a deprecated mysql-connector version. Please use mysql-connector-python instead.

s0xzwasd
  • 2,895
  • 3
  • 17
  • 26