The speed of opening the homepage in the local test is about 4900ms. After uploading to the server and setting up the homepage, the speed of opening the homepage becomes 29000ms. Testing on the server to cancel the mysql query opens the speed of 400ms. All problems judged to be mysql change the pdo connection address from localhost to 127.0.0.1 It’s still very slow. The webpage has also been compressed. I would like to ask the master how to solve this problem:
Which configuration files of mysql need to be modified after the website is uploaded to the server?
What things on the server need to be set and optimized? ?
Please try to be as detailed as possible
answer according to the points you want to brush
Does your homepage display the data extracted from the database? If so, it must be that your mysql cannot withstand such a heavy pressure and will slow down. For this, you need to use Memcached in mysql to load this file so that the mysql required for page display can be taken directly from the memory instead of using it. The sql statement directly accesses mysql. See if this method works.