The php program in the virtual space cannot access mysql and runs normally locally. if it is thrown into the space, it cannot be accessed (the database address is changed, and the database table is also created, statement can also be accurately executed ). I tried several methods, but none of them worked. Do you have any experience in this field, and do you have to set something to waste space? & Nbsp; it is best to give a simple link case and find out the data. thank you very much. The php program I used to query the virtual space on the Internet cannot access mysql.
The local operation is normal and cannot be accessed when it is thrown into the space (the database address is changed, the database table is also created, and the statement can be accurately executed ).
I tried several methods, but none of them worked.
Do you have any experience in this field, and do you have to set something to waste space?
It is best to give a simple link case and find out the data. thank you very much.
I have searched the Internet for several link methods, but they are useless.
------ Solution --------------------
Debug based on the error message.
------ Solution --------------------
What does your "inaccessible" mean? You should provide more information.
------ Solution --------------------
Use database tools to access databases
The local build runs normally.
500 error
Based on your information and code snippets, you can only say that your server does not support mysqli extension.
Try to use mysql extension
------ Solution --------------------
The information you sent is too limited. you can send the relevant code block to see which line of error is supported.
I suspect that the path of the file referenced by include () is incorrect.
------ Solution --------------------
Use the header to specify the character set.
------ Solution --------------------
Add the following line of code at the beginning of php to try to see if other errors will be output:
PHP code
Error_reporting (E_ALL );
------ Solution --------------------
A user name or password error causes a series of subsequent errors. Solve the character set first. The output is garbled.
------ Solution --------------------
Access denied for user 'zuohou66xy1 '@ '483ef4cdf4b24bb'
Access is denied. is the database on a remote machine? Database User and permission configuration issues.
------ Solution --------------------
Indeed, access is denied.