Berikut beberapa cara koneksi database mysql dengan driver ODBC.
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.
Specifying character set
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Note that the charset option works from version 3.51.17 of the driver.
Specifying socket
This one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;
On Windows, the socket variable is the name of the named pipe that is used for local client connections. The default value is MySQL.
On Unix platforms, the socket variable is the name of the socket file that is used for local client connections. The default is /tmp/mysql.sock.
Using SSL
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;
SSLCA specifies the path to a file with a list of trust SSL CAs
SSLCERT specifies the name of the SSL certificate file to use for establishing a secure connection.
SSLKEY specifies the name of the SSL key file to use for establishing a secure connection.
Nah kurang lebih caranya begitu, kalau pengin lihat lebih detail, bisa lihat disini http://www.connectionstrings.com. Selamat mencoba

Related Posts:

  • Kloxo part 2 – Setting DNS pada KloxoSebuah fasilitas pada VPS (Virtual Private Server) yang menggunakan Kloxo sebagai control panel webhostingnya, anda dapat membuat name server anda sendiri melalui Setting DNS pada Kloxo. Anda dapat membuat NS seperti “ns1 … Read More
  • Kloxo part 1 – Kenalan Sama KloxoBiasanya kalo kita punya VPS dengan OS linux, rata-rata menggunakan Kloxo sebagai kontrol panel untuk hostingnya. Kloxo adalah kontrol panel ringan. Kloxo memiliki semua fitur yang disertakan dalam semua panel kontrol terk… Read More
  • Sedikit Cerita Tentang HostingHosting, sebenarnya adalah sebuah server yang memiliki spesifikasi tinggi yang dapat menampung jutaan file agar bisa diakses dari segala penjuru dunia dengan jaringan internet. Server ini dikhususkan untuk melayani servis … Read More
  • HyperVM part 3 – Setting DNS di HyperVMHyperVm memiliki fasilitas untuk pengaturan DNS zone bagi domain-domain yang akan di hostingkan atau diarahkan ke sebuah server VPS.Pada bagian ini akan sedikit di terangkan cara setting DNS melalui HyperVM, sebenarnya unt… Read More
  • HyperVM part 2 – Dasar-dasar HyperVMSudah bisa login ke HyperVM anda ? jika belum silahkan kembali ke postingan sebelumnya HyperVM part 1. Jika sudah bisa login maka akan muncul halaman utama untuk HyperVMnya, dan disinilah anda bisa memanage VPS anda.Halaman u… Read More

BTemplates.com

Categories

Kamera CCTV Palembang

Popular Posts

Blog Archive