EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Cannot open the Connection use LocalPortforwarding

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 03/21/2008 13:52:45
by Sittichai Promma (Basic support level)
Joined: 03/21/2008
Posts: 1

I downloaded and installed a new Version of SecureBlackbox and use LocalPortForwarding Sample Project.

I added a new button and the following code to the project and try to connect to my database.

private void LoadData()
   string connString = "Server=localhost;Port=3307;Database=database;Uid=user;Pwd=password;pooling=false";

   MySqlConnection mySqlConnection = new MySqlConnection();
   mySqlConnection.ConnectionString = connString;


      if (mySqlConnection.State == ConnectionState.Open)
         // Todo:
   catch (OdbcException ex)
      Console.WriteLine(ex.Message + Environment.NewLine);
      if (mySqlConnection != null && mySqlConnection.State == ConnectionState.Open)

private void btnTestSQL_Click(object sender, EventArgs e)
   Thread mySqlThread = new Thread(new ThreadStart(LoadData));

The Application hangs up (not responding) at the line mySqlConnection.Open()

Do you have any idea?

- I can connect to database with the same code only when i use Putty to forward port.
Posted: 03/24/2008 03:20:02
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

It is a common problem of all client MySQL components. To remove the hangup, move the code that sends MySQL requests to a separate thread. Please consider using the attached sample as a guide.

[ Download ]



Topic viewed 1516 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!