Reputation: 461
Hello I am having serious issues granting privileges to the only user in an azure database. I am logged on to MySql workbench to the user that azure auto provides me, but when I try to connect through a program that I am making I using the same connection string i am getting access denied errors.
I am trying to grant all privileges to the default user using the following code in mysql but I am getting accessed denied
GRANT ALL ON databasename.* TO 'USERNAME'@'%';
any help would be appreciated.
EDIT: I do not have the password for the user root, I only have the username and password azure has provided me with apparently
Upvotes: 0
Views: 1227
Reputation: 766
I used nugget to get MySQL.Data in my web form project (vs 2015), and adding the cleardb connection string in the code below worked for me. I am also able to connect using MySQL workbench from the same machine as well. This should work for you as well. please check and let me know.
MySql.Data.MySqlClient.MySqlConnection conn;
string myConnectionString;
myConnectionString = "<your cleardb conn string>";
try
{
conn = new MySql.Data.MySqlClient.MySqlConnection();
conn.ConnectionString = myConnectionString;
conn.Open();
System.Data.ConnectionState state = conn.State;
}
catch (MySql.Data.MySqlClient.MySqlException ex)
{
Console.Write(ex.Message);
}
Upvotes: 1