Do I need to connect to the database when using this function? How do I specify the address of the mysql server used to connect to the database? Currently, mysqlserver is connected to the local machine. do you need to install a mysqlserver on every machine running php? Or modify the tmpmys .. function on all machines. do you need to connect to the database when using this function? How do I specify the address of the mysql server used to connect to the database? Currently, the mysql server is connected to the local machine. do you need to install a mysql server on every machine running php? Or modify/tmp/mysql. sock on all machines? This is strange.
Reply content:
Do I need to connect to the database when using this function? How do I specify the address of the mysql server used to connect to the database? Currently, the mysql server is connected to the local machine. do you need to install a mysql server on every machine running php? Or modify/tmp/mysql. sock on all machines? This is strange.
You do not need to use the/tmp/mysql. sock connection. you only need a connection id created with mysql_connect or mysql_pconnect.
Why not use mysql_escape_string?
Of course, you need to connect to the database. mysql. sock is automatically generated after mysql is connected.
When installing php, did the landlord specify that sock is required to connect to mysql? If yes, just remove it.