Goran Bibic

Goran Bibic

  • 480
  • 2.9k
  • 200.7k

Can't conect to mysql database

Aug 11 2023 1:54 PM

Error

MySql.Data.MySqlClient.MySqlException
  Message=Unable to connect to any of the specified MySQL hosts.

Cant conect to mysql database

From wortbench work normaly

 class Constants
    {
        #region MYSQL CONNECTION STRING
        
        public static string connectionString = "Server=ip_adress;Database=bss_2023;Uid=root;Pwd=password;";

        #endregion

        #region MYSQL SELECT ALL QUERY
        public static string selectAllQuery = "select * from bss_2023.tip";
        #endregion

        #region MYSQL INSERT COMMAND
        public static string insertNote = "insert into tip (id,naziv) values(@id,@naziv);";
        #endregion

    }

 


Answers (2)