我在访问我的godaddy帐户中的数据库时遇到问题。我已经在phpmyadmin中创建了一个数据库,在mysql数据库中创建了一个用户。我需要使用我的localhost访问我的godaddy帐户中的数据库。但是当我运行我的代码时,我得到了一个host xxxx is not allowed to connect to this mysql
我参考了下面的教程来为我的web应用程序创建一个登录页面。ImportError: No module named MySQLdbhttp://127.0.0.1:5000/testdb
我已经尝试了所有可能的方法来安装pythonmysql,也就是教程easy_install,sudo apt-get install中提到的方法。我已经在我的虚拟环境中安装了mysql。我的目录结构和教程中解释的是一样的。
我希望从Python内部创建一个MySQL数据库。我可以找到关于如何连接到现有数据库的说明,但找不到如何初始化新数据库的说明。connecting will not create a database if it doesn't already exist, as i had hoped)
这是上的第一行指令,我得到了错误_mysql_exceptions.OperationalError: (2003, "Can't connect to