C# 数据库mysql 问题Access denied for user 'guru2b'@'localhost' to database 'haha'
如题。。。代码如下:public static ArrayList getData()
{
MySqlConnection con = new MySqlConnection("Host=localhost;Port=3306;UserName=guru2b;Password=g00r002b;Persist Security Info=True;Database=coalthreed");
con.Open();
string str = "select *from TestData";
MySqlDataAdapter da = new MySqlDataAdapter(str, con);
DataSet ds = new DataSet(); da.Fill(ds);
count = ds.Tables[0].Rows.Count;
ArrayList List1 = new ArrayList();
Random ran = new Random();
for (int i = 0; i < count; i++)
{
List1.Add(Convert.ToInt32(ds.Tables[0].Rows[i][1]));
}
return List1;
}
private void timer1_Tick(object sender, EventArgs e)
{
for (int i = 0; i < 5; i++)
{
arry.RemoveAt(i);
}
this.Refresh();
drawcurve.StartDraw(this.groupBox1.CreateGraphics(), arry);
}
private void Move_Left_Click(object sender, EventArgs e)
{
timer1.Enabled = true;