В кратце, есть код на питоне
cur.execute("CREATE DATABASE `{0}` CHARACTER SET utf8 COLLATE "
"utf8_general_ci".format(db_name))
cur.execute("CREATE USER '{0}'@'%' IDENTIFIED BY '{1}'".format(username, password))
cur.execute("GRANT ALL PRIVILEGES ON {0}.* TO '{1}'@'%' WITH GRANT"
" OPTION".format(db_name, username))
cur.execute("GRANT ALL PRIVILEGES ON {0}.* TO '{1}'@'localhost' WITH GRANT"
" OPTION".format(db_name, username))
cur.execute("FLUSH PRIVILEGES;")
Access denied for user 'P3X7KA4YXI4F18B9'@'localhost' (using password: YES)
Что я делаю не так? Разве '%' не должен просто работать?