พอดีผมฝึกเขียน C# เชื่อมต่อกับ mysql แต่ติดปัญหา Error รบกวนหน่อยนะครับ

พอดีผมเขียนโปรแกรมเชื่อมต่อกับ MySql แต่ติดปัญหา Error



อันนี้ครับผมโค้ด ที่มัน Error  C#
using MySql.Data.MySqlClient;
using MySql.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
             {
        
            MySqlConnectionStringBuilder conn_string = new MySqlConnectionStringBuilder();
            conn_string.Server = "mysql.hostinger.in.th";
            conn_string.UserID = "3zVnO0HpfAN6a1";
            conn_string.Password = "u712964401_nextw";
            conn_string.Database = "u712964401_nextw";

            MySqlConnection conn = new MySqlConnection(conn_string.ToString());
         string sal = "SELECT * FROM test";
            MySqlCommand cmd = new MySqlCommand(sal, conn);
             conn.Open();
            MySqlDataReader reader = cmd.ExecuteReader();
            while (reader.Read())
            {
                Console.WriteLine(reader.GetString("name"));
            }
        
        }
    }
}
คำตอบที่ได้รับเลือกจากเจ้าของกระทู้
ความคิดเห็นที่ 5
จะเชื่อมต่อจากภายนอก share hosting เค้าไม่อนุญาติอยู่แล้วครับ แนะนำให้ใช้ VPS ขึ้นไป
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่