Hi,
I am trying to fetch data from db.
command = "mysql -N -u<username> -p<password> -hmysql.server <databaseName> -e "
selectSql = "Some select Statement"
responseData=execute_command_local(command+"\""+selectSql+"\"")
def execute_command_local(command):
results = os.popen(command).read()
return results.strip("\n")
But I am recieving this error
ERROR 1044 (42000): Access denied for user '<username>'@'%' to database '<username>'
Any help would be appreciated.
Thank You in advance.