우선, 나는 이것이 백만 번 요청되었음을 알고 있지만 무엇이 잘못되었는지 파악할 수 없습니다.
Microsoft Management Studio를 사용하여 로컬 데이터베이스를 만들었으며 C #을 통해 연결하고 싶습니다. 내 코드는 다음과 같습니다.
string connStr = "Server=MSSQLSERVER;Database=UrenRegi;IntegratedSecurity=yes;Uid=auth_windows;";
MySqlConnection conn = new MySqlConnection(connStr);
conn.Open();
MySqlCommand cmd = new MySqlCommand("SELECT * From Users", conn);
MySqlDataAdapter adp = new MySqlDataAdapter(cmd);
DataSet ds = new DataSet();
adp.Fill(ds, "LoadDataBinding");
dataGrid.DataContext = ds;
conn.Close();
오류: Additional information: Unable to connect to any of the specified MySQL hosts.
나는 그것이 작동하는지 확실히 알고 있기 때문에 Windows 인증을 사용하고 있습니다.
Microsoft SQL Server는 MySQL이 아닙니다. (다른 모든 클래스에 대해 동일) SqlConnection
대신 사용하십시오 MySqlConnection
.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다