Summary of various DNS setup methods in the PDO connection database in PHP, pdodns_php tutorial

Source: Internet
Author: User
Tags db2 odbc driver ibm db2 ibm db2 odbc driver

Summary of various DNS setup methods in the PDO connection database in PHP, Pdodns


This paper summarizes the various DNS setting methods in the PDO connection database in PHP. Share to everyone for your reference, as follows:

The DNS notation in PDO is as follows:

MSSQL: Host=localhost;dbname=testdb

Sybase: Host=localhost;dbname=testdb

dblib: Host=localhost;dbname=testdb

Firebird: User=john; Password=mypass;database=database. Gde;datasource=localhost; port=305
DRIVER={IBM DB2 ODBC DRIVER};D atabase=database; Hostname=hostname; Port=port; Protocol=tcpip; Uid=username; Pwd=password;

Informix: host=host.domain.com; service=9800;
database=common_db; Server=ids_server; PROTOCOL=ONSOCTCP;
Enablescrollablecursors=1

MySQL: host=localhost;port=3307;dbname=testdb

MySQL: unix_socket=/tmp/mysql.sock;dbname=testdb

OCI:d bname=//localhost:1521/mydb

ODBC: TestDB

ODBC:D RIVER={IBM DB2 ODBC DRIVER}; Hostname=localhost; Port=50000;database=sample; Protocol=tcpip; Uid=db2inst1; PWD=IBMDB2;

ODBC:D river={microsoft Access Driver (*.mdb)};D Bq=c:\\db.mdb; Uid=admin

pgsql: host=localhost port=5432 dbname=testdb user=bruce password=mypass

SQLite:/opt/databases/mydb.sq3
Sqlite::memory:
Sqlite2:/opt/databases/mydb.sq2
Sqlite2::memory

More interested in PHP related content readers can view this site topic: "PHP based on PDO operation database Tips Summary", "PHP+MONGODB Database operation Skills Daquan", "PHP Object-oriented Programming tutorial", "PHP String Usage Summary", " Php+mysql database Operation Tutorial "and" PHP common database Operation Skills Summary "

I hope this article is helpful to you in PHP programming.

http://www.bkjia.com/PHPjc/1127917.html www.bkjia.com true http://www.bkjia.com/PHPjc/1127917.html techarticle a summary of various DNS setup methods in the PDO connection database in PHP, Pdodns This article summarizes the various DNS settings in the PDO connection database in PHP. Share to everyone for your reference, as follows: ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.