Related Links : Search Engine Optimization | | Search Engine Marketing | Online Marketing | Freelance Programmer| SEO Thailand | SEO Expert | SEO services | PHP Programmer Thailand | SEO Tutorial | What is SEO |

  Home Our SEO Services SEO Expert Consultant Php Programmer Scripts| Email : sachin {at} jainsachin {dot} com

PHP | Connecting to MySQL databases | Manual | Tutorial | Help

SEO Services



Website Programming in PHP / MYSQL



Friends


    Connecting to MySQL databases

    PDO_MYSQL DSN

    (No version information available, might be only in CVS)

    PDO_MYSQL DSN — Connecting to MySQL databases

    Description

    The PDO_MYSQL Data Source Name (DSN) is composed of the following elements:

    DSN prefix

    The DSN prefix is mysql: .

    host

    The hostname on which the database server resides.

    port

    The port number where the database server is listening.

    dbname

    The name of the database.

    unix_socket

    The MySQL Unix socket (shouldn't be used with host or port).

    Examples

    Example #1 PDO_MYSQL DSN examples

    The following example shows a PDO_MYSQL DSN for connecting to MySQL databases:

    mysql:host=localhost;dbname=testdb
    
    More complete examples:
    mysql:host=localhost;port=3307;dbname=testdb
    mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
    


    SEO Tutorial / Articles





    Php / Mysql Tutorial



    Articles



      Portfolio


      SEO by Jainsachin