title: MySQL connection string not working
body: <p>I have the following connection string: </p>
  
  <p><code>Data Source=localhost;UserID=root;Password=;Database=eyebus;</code></p>
  
  <p>When I try to connect  to the database I get an error saying that maybe the server was not found or not accessible. What is the problem with this string,?</p>
  
  <p>I also tried other strings/words I found on the Internet, but none of them actually worked.</p>
  
  <p>Also, the problem is not the server, since it can be accessed by other applications.</p>
  
  <pre><code>class SQLManager
      {
  
          private static string conString = ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ToString();
  
  
          public List&lt;PesquisaOcorrenciasExistentesModel&gt; getOcorrencias()
          {
              List&lt;PesquisaOcorrenciasExistentesModel&gt; ocorrencias = new List&lt;PesquisaOcorrenciasExistentesModel&gt;();
  
              using (SqlConnection con = new SqlConnection(conString))
              {
                  try
                  {
                      con.Open();
                  }
                  catch (Exception e)
                  {
                      Debug.WriteLine(e.Message);
                  }
                  using (SqlCommand com = new SqlCommand("SELECT * FROM ocorrencias", con))
                  {
                      SqlDataReader reader = com.ExecuteReader();
                      while (reader.Read())
                      {
                          PesquisaOcorrenciasExistentesModel o = new PesquisaOcorrenciasExistentesModel();
                          o.IdOcorrencia = reader.GetInt16(0);
                          o.IdOcorrenciaTipo = reader.GetInt16(1);
                          o.DataInicio = reader.GetDateTime(2);
                          o.DataFim = reader.GetDateTime(3);
                          o.Operador = reader.GetString(4);
                          o.Motorista = reader.GetString(5);
                          o.Cobrador = reader.GetString(6);
                          o.Terceiros = reader.GetString(7);
                          o.Descricao = reader.GetString(8);
                          o.EmailsEnviados = reader.GetString(9);
                          o.TipoOcorrenciaOutro = reader.GetString(10);
                          ocorrencias.Add(o);
                      }
                  }
              }
  
              return ocorrencias;
          }
      }
  }
  </code></pre>