In the local WAMP environment, I created a website. The database password was set by myself at the time. The local debugging was completed, and then I purchased the Wanwang virtual host. The website file was uploaded successfully, and the sql file was also imported into the database, and there was no error. However, when accessing Site Tips:
<code>MySQL Server Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ( 2002 ) </code>
It should be that the database password for local debugging is different from the database password of Wanwang. How to deal with this situation?
Does the sql file exported by WAMP contain the database name and password?
The local site program setting is http://localhost/website. Do I need to change the site settings when migrating to Wanwang virtual space? If so, how to modify it?
In the local WAMP environment, I created a website. The database password was set by myself at the time. The local debugging was completed, and then I purchased the Wanwang virtual host. The website file was uploaded successfully, and the sql file was also imported into the database, and there was no error. However, when accessing Site Tips:
<code>MySQL Server Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ( 2002 ) </code>
It should be that the database password for local debugging is different from the database password of Wanwang. How to deal with this situation?
Does the sql file exported by WAMP contain the database name and password?
The local site program setting is http://localhost/website. Do I need to change the site settings when migrating to Wanwang virtual space? If so, how to modify it?
The configuration of MySQL is incorrect. This error is usually caused by the database not being started.
An incorrect password will not prompt this way
Confirm whether the name and password exist in the sql file, and change it to the name and password of the online environment
The domain name of the local program you mentioned? Of course the domain name needs to be changed. If the domain name is hard-coded in the program, it must be changed. Change it however you want, change it how you write it, you will definitely find a way.