Connection strings for MySQL

Connection string is a string that contains information about a data source and means of connection to it.
It is commonly used to connect database to web application.

MySQL Connector/Net
Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;Uid=DATABASE_USER;Pwd=DATABASE_USER_PASSWORD;

MySQL Connector/ODBC 3.51
Driver={MySQL ODBC 3.51 Driver};Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;User=DATABASE_USER; Password=DATABASE_USER_PASSWORD;Option=3;

MySQL Connector/ODBC 5.1
Driver={MySQL ODBC 5.1 Driver};Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;User=DATABASE_USER; Password=DATABASE_USER_PASSWORD;Option=3;

MySQL Connector/ODBC 5.2
For ANSI Records:
Driver={MySQL ODBC 5.2 ANSI Driver};Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;User=DATABASE_USER; Password=DATABASE_USER_PASSWORD;Option=3;
For Unicode Records:
Driver={MySQL ODBC 5.2 Unicode Driver};Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;User=DATABASE_USER; Password=DATABASE_USER_PASSWORD;Option=3;

MySQL Connector/ODBC 5.3
For ANSI Records:
Driver={MySQL ODBC 5.3 ANSI Driver};Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;User=DATABASE_USER; Password=DATABASE_USER_PASSWORD;Option=3;
For Unicode Records:
Driver={MySQL ODBC 5.3 Unicode Driver};Server=MYSQL_Server_IP;Port=MYSQL_PORT;Database=DATABASE_NAME;User=DATABASE_USER; Password=DATABASE_USER_PASSWORD;Option=3;

Sample:
Server=222.222.222.222;Port=3366;Database=MyDatabase;Uid=MyUser;Pwd=MyPassword;

  • 1 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

DirectAdmin: Backup MySQL database

Please follow the steps below to backup MySQL database in DirectAdmin control panel. * Please...

DirectAdmin: Restore MySQL database

Please follow the steps below to restore MySQL database in DirectAdmin control panel. * Please...

DirectAdmin: Creating MySQL database

Please follow the steps below to create MySQL database in DirectAdmin control panel. * Please...

SolidCP & MSPControl: Create MySQL database

Please follow the steps below to create your MySQL database. * Please replace yourdomain.com...

phpMyAdmin: Backup MySQL database

Please follow the steps below to backup/export your MySQL Database:1. Login to your phpMyAdmin...