Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I work in C # through MySQL.Data.dll. Normally, all works fine, but sometimes it pops up an error "Unable to connect to any of the specified MySQL hosts". What is this error and how to get rid of it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
565 views
Welcome To Ask or Share your Answers For Others

1 Answer

You may check mysql server is working or not and you can add port number of mysql in connection string like this

    "Server = myServerAddress;
       Port = 1234;
   Database = myDataBase;
        Uid = myUsername;
        Pwd = myPassword;"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...