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: ...