php - how to connect to mySQL on localhost via unix socket -
i moved hosting server company. , used db.inc.php connect database, config follows:
<?php define('db_info', 'mysql:databaselocation;dbname=nameofthedatabase'); define('db_user', 'admin'); define('db_pass', 'admin'); ?>
but new hosting server "localhost via unix socket"..
i'm not sure how connection works..can utilize same php file connect?
it can found in documentation:
mysql:dbname=testdb;unix_socket=/path/to/socket
you musn't specify host when using socket.
php sql pdo localhost
No comments:
Post a Comment