Home > Backend Development > PHP Tutorial > Summary of various DNS setting methods in PDO connection database in PHP, pdodns_PHP tutorial

Summary of various DNS setting methods in PDO connection database in PHP, pdodns_PHP tutorial

WBOY
Release: 2016-07-12 08:51:58
Original
1177 people have browsed it

A summary of various DNS setting methods in the PDO connection database in PHP, pdodns

This article summarizes the various DNS setting methods in the PDO connection database in PHP. Share it with everyone for your reference, the details are as follows:

The DNS writing method 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};DATABASE=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:dbname=//localhost:1521/mydb

odbc:testdb

odbc:DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME=localhost;PORT=50000;DATABASE=SAMPLE;PROTOCOL=TCPIP;UID=db2inst1;PWD=ibmdb2;

odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=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

Readers who are interested in more PHP-related content can check out the special topics of this site: "Summary of PHP database operation skills based on pdo", "PHP MongoDB database operation skills collection", "php object-oriented programming introductory tutorial", "php Summary of String Usage", "Introduction Tutorial on PHP MySQL Database Operation" and "Summary of PHP Common Database Operation Skills"

I hope this article will be helpful to everyone in PHP programming.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1127917.htmlTechArticleA summary of various DNS setting methods in PDO connection database in PHP, pdodns This article summarizes the PDO connection database in PHP Various DNS setting methods. Share it with everyone for your reference, the details are as follows:...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template