Contact Form

Name

Email *

Message *

Wednesday, September 18, 2013

Connection to My SQL

MySQL Connector/Net

Standard
    | Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
    | MySQL

Specifying TCP port
    | Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;
    | Pwd=myPassword;

MySQLDriverCS

    | Location=myServerAddress;Data Source=myDataBase;User ID=myUsername;
    | Password=myPassword;Port=3306;Extended Properties="""";

SevenObjects MySqlClient

    | Host=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;

dotConnect for MySQL (former MyDirect.NET and Core Labs MySQLDirect.NET)

    | User ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase;
    | Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;
    | Max Pool Size=100;Connection Lifetime=0;

MySQL OLEDB

    | Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;

.NET Framework Data Provider for OLE DB

    | Provider=any oledb provider's name;OledbKey1=someValue;OledbKey2=someValue;

MySQL Connector/ODBC 5.1

Local database

    | Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase;
    | User=myUsername;Password=myPassword;Option=3;

On 64 bit machine
It seems we need to point on MSDASQL for the (32 bit) ODBC driver to work on 64 bit machines.

    | Provider=MSDASQL;Driver={MySQL ODBC 5.1 Driver};Server=localhost;
    | Database=myDataBase;User=myUsername;Password=myPassword;Option=3;

64 bit version of the driver
Note the "w" in the driver name.

    | Driver={MySQL ODBC 5.2w Driver};Server=localhost;Database=myDataBase;
    | User=myUsername;Password=myPassword;Option=3;

Remote database

    | Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;
    | User=myUsername;Password=myPassword;Option=3;
  
Specifying TCP/IP port

    | Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;
    | Database=myDataBase;User=myUsername;Password=myPassword;Option=3;

MySQL Connector/ODBC 3.51

Local database

    | Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDataBase;
    | User=myUsername;Password=myPassword;Option=3;

Remote database

    | Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;
    | User=myUsername;Password=myPassword;Option=3;
  
Specifying TCP/IP port

    | Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Port=3306;
    | Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL.

MyODBC 2.50

Local database

    | Driver={mySQL};Server=localhost;Option=16834;Database=myDataBase;
      
Remote database

    | Driver={mySQL};Server=myServerAddress;Option=131072;Stmt=;Database=myDataBase;
    | User=myUsername;Password=myPassword;
      
Specifying TCP/IP port

    | Driver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=;
    | Database=myDataBase;User=myUsername;Password=myPassword;

The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL.

0 comments:

Post a Comment