[C#] Check If MySQL Database Allows Remote Connection

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

Elite_Modz

Active Poster
Retired Staff
Active Member
Console ID Poster
Dec 19, 2014
517
380
133
Crunch
Reference:
Code:
using MySql.Data.MySqlClient;

Add Code 0x01 Here:

Code 0x01:
Code:
  private string conn;
  private MySqlConnection connect;

Download MySql.Data.DLL and install (Project>Add Reference>Browse For this File):

Code:
Code:
private void db_connection()
  {
  try
  {
  string server;
  string database;
  string uid;
  string password;
  server = "";//Database Server
  database = "";//Database Name
  uid = "";//Database Username
  password = "";//Database Password
  string connectionString;
  connectionString = "SERVER=" + server + ";" + "DATABASE=" +
  database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
  connect = new MySqlConnection(connectionString);
  connect.Open();

  MessageBox.Show("MySQL Database Supports Remote Connection");
  connect.Close();
  }
  catch (MySqlException e)
  {
  throw;
  }
  }
 
Last edited:
General chit-chat
Help Users
  • @ QM|T:
    all good you
  • @ lurch6661:
    all good won 140 bucks on snoop dollar slot machine bought weed with it so iam happy lol
  • @ QM|T:
    haha cool
  • @ lurch6661:
    got a nother ps4 game
  • @ lurch6661:
    doom eternal
  • @ QM|T:
    nice
  • @ lurch6661:
    all this and more if the price is right
  • @ lurch6661:
    lol
  • @ QM|T:
    how mutch is it
  • @ QM|T:
    that old bo 1 and 2 will be 80 for those old games haha
  • @ lurch6661:
    lol
  • @ QM|T:
    so what you up too
  • @ lurch6661:
    music smoking
  • @ QM|T:
    lol
  • @ lurch6661:
    you ready for the new heist on gta
  • @ lurch6661:
    only here in texas
  • @ lurch6661:
    lol
  • @ QM|T:
    yea are you hahaha
  • Chat Bot:
    thedemonspawn56 has left the room.
  • Chat Bot:
    KzVTz is our newest member. Welcome!
  • @ KzVTz:
    Thanks my brother
  • Chat Bot:
    Jimmy123098 is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    joseillo is our newest member. Welcome!
      Chat Bot: joseillo is our newest member. Welcome!