Jump to content

Mysql c# csatlakozás


Recommended Posts



Visual studio 2010 ultimate-en dolgozok és akárhányszor kapcsolódni szeretnék az atw adatbázisához ezt a hibaüzenetet kapom vissza (


Access denied for user 'felhaszn'@'localhost' (using password: YES)


avagy (

Unable to connect to any of the specified MySQL hosts.


a kód amit használok :

string MyConString = "SERVER=;Port=3306;DATABASE=felhasznnev;UID=felhasznnev;PASSWORD=


MySqlConnection connection = new MySqlConnection(MyConString);

MySqlCommand command = connection.CreateCommand();


command.CommandText = "select * from users";



MySqlDataReader Reader = command.ExecuteReader();


while (Reader.Read())


string thisrow = "";

for (int i = 0; i < Reader.FieldCount; i++)

thisrow += Reader.GetValue(i).ToString() + ",";





a server résznél próbálkoztam úgy is hogy a portot közvetlenül a szerverhez írom pl így : ez se volt hajlandó csatlakozni.


elõre is köszönöm a segtséget!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...