Mysqli cannot connect to mysql Port 3307 on the database server. I want to use mysqli_connect to call the stored procedure on the server. However, I have always been prompted that the connection will fail, but the same server, database, and account password will apply, mysql_connect can be connected. what is the problem?
Error code:
Warning: mysqli_connect () [function. mysqli-connect]: (HY000/2003): Can't connect to MySQL server on '59. 63. xxx. xxx: 3307 '(10060)
Reply to discussion (solution)
Check whether your mysql instance allows ip 59.63.xxx.xxx connection.
$ Db = new MySQLi ('server', 'user', 'pwd', '', 0,
'/Tem/mysqld. sock ')
Check whether your mysql instance allows ip 59.63.xxx.xxx connection.
The mysql database is on the server of this IP address.
$ Mysql_db = mysqli_connect ($ my_Host, $ my_Username, $ my_Password, $ my_Database );
Mysqli_connect removes an I and becomes mysql_connect. why ~~~~~~
$ Link = mysqli_connect ('localhost', 'My _ user', 'My _ password', 'My _ db', '123'); in this way, put the port behind
Mysqli_connect? Alias mysqli ::__ construct () is equivalent
$ Mysqli = new mysqli ('localhost', 'My _ user', 'My _ password', 'My _ db', '123 ');