Guest User

Untitled

a guest
Jan 15th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. string serverName = "mysql.zzz.com.ua";
  2. string userName = "root";
  3. string dbName = "dbname";
  4. string port = "3306";
  5. string password = "pass";
  6. string connStr = "server=" + serverName +
  7. ";user=" + userName +
  8. ";database=" + dbName +
  9. ";port=" + port +
  10. ";password=" + password + ";";
  11. var connectionString = "server=" + serverName + ";" + "database=" + dbName + ";" + "uid=" + userName + ";" + "pwd=" + password + ";";
  12.  
  13.  
  14. MySqlConnection conn = new MySqlConnection(connStr);
  15. try
  16. {
  17. conn.Open();
  18.  
  19. }
  20. catch (Exception ex)
  21. {
  22. MessageBox.Show(ex.ToString());
  23. }
  24.  
  25. > Возникло исключение "MySql.Data.MySqlClient.MySqlException" в
  26. > MySql.Data.dll ("Authentication to host 'mysql.zzz.com.ua' for user
  27. > 'root' using method 'mysql_native_password' failed with message:
  28. > Logins are not allowed") MySql.Data.MySqlClient.MySqlException
Add Comment
Please, Sign In to add comment