halilyanik98
Öğrenci
- Katılım
- 9 Temmuz 2020
- Mesajlar
- 14
- Reaksiyon puanı
- 1
- Puanları
- 3
- Yaş
- 25
using MySql.Data;
using MySql.Data.MySqlClient;
using System.Data.Odbc;
//VERİTABANI BAĞLANTISI-----------------------------------------------------------------------------------
private static string sIp = "*****************"; // Sunucu IP Adresi
private static string sDB = "****************"; // Veritabanı
private static string sKA = "****************"; // Kullanıcı Adı
private static string sSifre = "**************"; // Şifre
public MySqlConnection mysqlbaglan = new MySqlConnection("Server=" + sIp +";Database=" + sDB + ";Uid=" + sKA + ";Pwd='" + sSifre + "';");
Bu kod ile bağlantı yapmaya çalışıyorum ama ;
MySql.Data.MySqlClient.MySqlException: 'Unable to connect to any of the specified MySQL hosts.'
hatası alıyorum. normal host 3306 ama benim 3308 ile bağlanmam gerekiyor yardım edebilir misiniz.
MySql.Data kütüphanesi ekli
Visual Studio 2017
using MySql.Data.MySqlClient;
using System.Data.Odbc;
//VERİTABANI BAĞLANTISI-----------------------------------------------------------------------------------
private static string sIp = "*****************"; // Sunucu IP Adresi
private static string sDB = "****************"; // Veritabanı
private static string sKA = "****************"; // Kullanıcı Adı
private static string sSifre = "**************"; // Şifre
public MySqlConnection mysqlbaglan = new MySqlConnection("Server=" + sIp +";Database=" + sDB + ";Uid=" + sKA + ";Pwd='" + sSifre + "';");
Bu kod ile bağlantı yapmaya çalışıyorum ama ;
MySql.Data.MySqlClient.MySqlException: 'Unable to connect to any of the specified MySQL hosts.'
hatası alıyorum. normal host 3306 ama benim 3308 ile bağlanmam gerekiyor yardım edebilir misiniz.
MySql.Data kütüphanesi ekli
Visual Studio 2017