Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tutorial How to use "localhost" correctly in MySQLi

Comments in 'Resources' started by Legoboy0215, May 4, 2016.

  1. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    localhost is usually what people use when trying to connect to a MySQL server on their machine. 127.0.0.1 is ok, but sounds worse than localhost :p

    Simply, just locate your php.ini file of the PM installation (Normally /bin/php[5 or 7]/bin/php.ini), then locate the MySQL socket file (It's in my.cnf or whatever the MySQL config file is called), which is in the option socket = BLAH.

    Well, now just add this line:
    Code:
    mysqli.default_socket=YOUR-SOCKET-PATH
    
    YAY! Works with PurePerms, for example.

    Like if useful!

Share This Page

Advertisement