Ok, I have a class that I am using to connect to the my database. I am not using a password at first just so I can get it up and running.
import mysql.connector
class DBCommunicator:
def __init__(self):
self.conn = mysql.connector.connect(host='mysql.server',
user='marvinfarrell',
database='marvinfarrell$ninjadb')
self.cursor = self.conn.cursor()
#####################
all database operations
#####################
def __del__(self):
self.conn.close()
And this is the error I am getting
mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'marvinfarrell'@'ip-10-120-222-64.ec2.internal' (using password: NO)
2014-04-17 12:02:21,661 :Exception AttributeError: "'DBCommunicator' object has no attribute 'conn'" in <bound method DBCommunicator.del of <database_connection.DBCommunicator object at 0x7f9594bd9d10>> ignored
2014-04-17 12:02:21,665 :Exception AttributeError: "'DBCommunicator' object has no attribute 'conn'" in <bound method DBCommunicator.del of <database_connection.DBCommunicator object at 0x7f95946e6dd0>> ignored
Any help regarding this issue would be greatly appreciated.