• Resolved WebCodePoet

    (@senjoralfonso)


    In the documentation, you wrote:

    // Connect to the DB and store the link into "$GLOBALS['nfw_mysqli']":
    $GLOBALS['nfw_mysqli'] = new mysqli( 'hostname', 'db_user', 'db_password', 'db_name', 'db_port' );
    // We need the table prefix too:
    $GLOBALS['nfw_table_prefix'] = 'wp_';

    But I have to deal with an unix socket: localhost:/var/run/mysqld/mysqld.sock

    How can I get this working? 🙂

    • This topic was modified 1 year, 1 month ago by WebCodePoet.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    The socket must be the 6th parameter:
    $GLOBALS['nfw_mysqli'] = new mysqli( 'hostname', 'db_user', 'db_password', 'db_name', 'db_port', '/var/run/mysqld/mysqld.sock' );

    Thread Starter WebCodePoet

    (@senjoralfonso)

    Works like a charm, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mysqli’ is closed to new replies.