How to connect to MySQL Database?

后端 未结 6 807
孤街浪徒
孤街浪徒 2020-11-22 11:36

I\'m very new to C# programming but would like to be able to access MySQL Databases (do not have the money for MS SQL)

However I have one question; I know you are re

6条回答
  •  悲哀的现实
    2020-11-22 12:09

     private void Initialize()
        {
            server = "localhost";
            database = "connectcsharptomysql";
            uid = "username";
            password = "password";
            string connectionString;
            connectionString = "SERVER=" + server + ";" + "DATABASE=" + 
            database + ";" + "U`enter code here`ID=" + uid + ";" + "PASSWORD=" + password + ";";
    
            connection = new MySqlConnection(connectionString);
        }
    

提交回复
热议问题