How to solve the problem of PHP failed to connect to ERP database?
Various business systems will encounter some problems during use. One of them is the inability to log in to the management software due to database connection failure. This is a very troublesome and common problem
General business systems use SQL databases. Here we summarize the reasons and solutions for SQL database connection failures:
Cause 1: The login account, password, server name, and database name are incorrectly logged in and cannot be used. Connection, this is relatively common, carefully check whether the information filled in is correct. If it is filled in correctly, it can usually be solved.
Solution: When the software being used fails to connect to the database, it is usually a problem with the server name. Changing the server name can generally solve the problem. If the database is installed on this machine, the server name can be replaced by "." or "(local)"; if it is installed on another computer in the LAN, the IP address can be used as the server name.
Reason two: If the SQL server is not installed correctly, the database connection will not be able to be connected; after installing the database, if the SQL service manager is not started, you need to go to the service to start it.
Solution: If the SQL database fails to be installed successfully, when you reinstall it again, the installation may not be possible, prompting that there is an unfinished installation hang. The solution is: open the registry editor, find and delete the PendingFileRenameOperations project in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager.
If you change the Windows user name or password, the SQL Service Manager will not start. The solution is to go to the service in the control panel to modify the startup. Specifically: click Start-->Settings-->Control Panel-->Administrative Tools-->Services-->Find the MS SQL SERVER service-->right-click on it-->Properties-- >Login-->Modify the account and password for starting the service.
Cause three: The database cannot be connected due to permission issues. The solution is to detect the security protection restrictions of the computer, SQL Server security settings, and operating system security restrictions.
Solution: You can temporarily turn off the firewall or anti-virus software to see if it is caused by the security settings of these software.
SQL Server Security Settings: Open Enterprise Manager--> Expand the SQL Server group--> Right-click the server name--> Click Properties--> In SQL Server Properties--> In Security, select "Authentication" as "In SQL Server and Windows";
If the SQL server uses a Windows XP system, when the workstation computer cannot connect to the database, you can Create an identical WINDOWS user account and password for each workstation
Cause 4: Cause: There is a fault in the network connection;
Solution: Check whether the network is faulty.
Related references:php tutorial
The above is the detailed content of How to solve php failure to connect to erp database. For more information, please follow other related articles on the PHP Chinese website!