Install PHP on the openwrt, prompting so
Online a chase to find
Discover how the can ' t connect local MYSQL Server though socket "/tmp/mysql.socket" resolves
People still look for the mysql.socket, I unexpectedly directly find the TMP directory, really no language. Other people's solution using soft connection directly invalid;
Do I have to compile php myself? Think of the big head.
Continue to find the solution:
In this document
http://kong1616.iteye.com/blog/682342
I found this sentence.
In/etc/php.ini Modify the value of Mysql.default_socket, in this file, the description of the value of Mysql.default_socket is this,
; Default socket name for local MySQL connects. If empty, uses the built-in MySQL defaults.
This value is empty at first, that is, PHP will use the default value built in MySQL if we do not take the initiative to modify it.
Really life-saving straw, my PHP program with the mysqli, and PHP.ini is configured in MySQL, so, php.ini add the following content, successfully solve the problem:
[Mysqli]mysqli.allow_local_infile=On mysqli.allow_persistent=On mysqli.cache_size= -mysqli.max_persistent= -1mysqli.max_links= -1Mysqli.default_port=3306Mysqli.default_socket=/tmp/Mysql.sock mysqli.default_host=127.0.0.1Mysqli.default_user=Root Mysqli.default_password=19870215Mysqli.connect_timeout= -Mysqli.trace_mode= Off
Can ' t connect local MYSQL Server though socket "/tmp" how to resolve