私はpythonの初心者で、mysqlデータベースに接続していくつかのことを行うサーバースクリプトを作成して、いくつかのことを学ぼうとしています。私はpython 3.3.1とmysql 5.0.96(コミュニティ)を持っています。mysql コネクタ/python をインストールし、mysql dev サイトのサンプル コードを使用して基本的な接続を試みました。ここに私の簡単なpythonスクリプトがあります:
#!/usr/local/bin/python3
import sys
import mysql.connector
db_config = {
'user': 'joebloggs',
'password': 'cleartext_passwd',
'host': '127.0.0.1',
'database': 'mydb'
}
cnx = mysql.connector.connect(**db_config)
cursor = cnx.cursor()
query = ('select usable_name, user_id from user')
cursor.execute(query)
for (usable_name, user_id) in cursor:
print("{} is the usable name of {d}".format(usable_name, user_id))
cursor.close()
cnx.close()
しかし、データベースへの接続でエラーが発生します
"Authentication with old (insecure) passwords "\
mysql.connector.errors.NotSupportedError: Authentication with old (insecure) passwords is not supported. For more information, lookup Password Hashing in the latest MySQL manual
私は何を間違っていますか?どんな助けでも大歓迎です