Testing php / mysqli connection

后端 未结 3 2040
长发绾君心
长发绾君心 2020-12-10 16:18

I am looking for a way to test just the connection portion of a php / mysqli connection. I am migrating from a LAMP server build on Vista to the same on Ubuntu and am havin

3条回答
  •  悲&欢浪女
    2020-12-10 16:33

    For test php connection in you terminal execute:

    $ php -r 'var_dump(mysqli_connect("localhost:/tmp/mysql.sock", "MYSQL_USER", "MYSQL_PASS",
         "DBNAME));'
    

提交回复
热议问题