Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about the stutter of phpmyadmin local application?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to do the phpmyadmin native app Catton, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

When using phpmyadmin, you often encounter slow responses, and it takes about 3-4 seconds to visit a page. To find out the reasons, there are different answers on the Internet, some say that they ask the server to verify the script and need to comment out part of the code of version_check.php, which I do, but it is invalid; others say that I need to modify the return time in Util.class.php, but it is also invalid.

Recommended tutorial: PHPMyAdmin

I have no choice but to open the debugging tool and find out what makes the tool so slow. Open network and see that there are two requests with a return time of more than 2 seconds for each visit, one is index.php, the other is sql.php, breakpoint debugging (the stupidest way, exit)

Finally, it takes more than 1 second to trace the mysqli_real_connect () method in the. / Libraries/classes/Dbi/DbiMysqli..php file. Print out the passed parameters and find that the $host parameter uses localhost and is modified to 127.0.0.1 (modified in config.inc.php). Immediately, the feeling of stutter disappears, and everything is fresh, natural and comfortable.

But why does mysqli_real_connect use localhost more slowly than '127.0.0.1'? Localhost! = 127.0.0.1?

Continue to check the information: check the official manual mysqli_real_connect function: http://php.net/manual/zh/mysqli.real-connect.php

It says:

Host can use domain names and IP addresses. If you pass NULL or the string "localhost", then the channel will be used instead of TCP/IP to connect to the local server.

I didn't use-- enable-named-pipe when I started the MySQL service locally, so I couldn't use pipe to connect to the server. I used TCP/ip to connect to the server, which of course slowed down!

The above is all the contents of the article "what to do with phpmyadmin Native App Catton". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report