In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to solve too many mysql data fragments, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
Mysql data fragmentation too many solutions: 1, enter the phpMyAdmin page, click the left column to manage the MySQL database, on the far right of the database there is a column called "redundant"; 2, click on the list of data tables below the "only choose redundant", and then click on the back of the drop-down menu, click "optimize Table", you can optimize and remove fragments.
The frequent reading and writing of the website database will form a large number of fragments, which will not only seriously affect the reading and writing speed, but also affect the website access experience. Therefore, you need to optimize the data tables and clean up the database fragments on a regular basis.
Most websites use MySQL database, the website program is different, the method of optimizing defragmentation of MySQL database is also different.
Next with Discuz! Website, WordPress website as an example, introduce in detail the methods and steps of defragmenting MySQL database.
At the same time, two ways to optimize the database are used to verify each other to see how defragmentation works in the end.
First, optimize and organize Discuz! The method of website MySQL Database fragmentation
If you are using Discuz! Create a website, check the database for fragmentation, and optimize and defragment the database, all of which can be found in Discuz! Manage the background, this is also the Discuz! One of the advantages of the program's ease of use.
View and optimize Discuz! The way to fragment the MySQL database of the website is to log in to the website management backend using the website founder (webmaster) account, and click "webmaster"-"database"-"optimization" on the top menu, as shown below:
As you can see from the picture above, this Discuz! There are already many fragmented data tables on the site, and the bottom shows that the size of the fragmented data table is 96.37m.
Yes, Discuz! Site database fragments for optimization, sorting, is also very convenient, directly maintain the default all data tables to be optimized by checking the state, click the lower optimization "submit" button, you can optimize the site MySQL database fragments to remove fragments.
II. The method of optimizing and sorting out the fragments of MySQL database on WordPress website.
The WordPress website also uses the MySQL database, with Discuz! The difference is that database fragmentation cannot be viewed and optimized directly in the WordPress background.
There are two ways to view database fragmentation on the WordPress website:
1. Install the MySQL database management plug-in
This method is not recommended, because the risk of using plug-ins is great, especially in such an important thing as managing the database, if something goes wrong, the website will be destroyed, so be careful.
2. Log in to the cPanel host control panel and manage the page through phpMyAdmin
Log in to the cPanel host management panel page of the WordPress website, and under the "Database" column, click "phpMyAdmin" MySQL database manager, as shown below:
After entering the phpMyAdmin page, click the MySQL database of the website you want to manage in the left column. On the far right of the database, there is a column named "redundant", as shown below:
What does "redundant" mean by the MySQL database tables displayed on the phpMyAdmin administration page? How did it come into being?
As the database is constantly in the process of reading and writing, data is constantly being written and deleted, when data is deleted, the subsequent data records cannot all move forward, which forms idle space. This is "redundant" data. Popularly speaking, these "superfluities" are the "fragments" of the database, because they cause data incoherence and, of course, affect the reading and writing speed of the database.
Therefore, optimize these data tables with "excess" data, that is, defragment the database.
The way to optimize and clean up the "redundant" fragments in these MySQL databases is to click "Select redundant only" at the bottom of the data table list, then click the drop-down menu behind, and click "optimize Table" to optimize and remove these "redundant" fragments, as shown below:
Prompt "your SQL statement has been run successfully", and the optimization is successful. At this point, you can see that the "redundant" column of the MySQL data table is blank and there are no fragments.
Third, verify the effect of defragmenting MySQL database.
In order to verify whether the "redundant" in the MySQL database table in the phpMyAdmin page is fragmented; whether the "optimized table" operation can remove these fragments, the "optimized table" above is used to clean up the "redundant" data, in fact, you choose a Discuz! The database of the website. Of course, optimizing the database of WordPress sites is the same step.
Face Discuz on the phpMyAdmin page! After the MySQL database of the website has optimized the table, now log in to Discuz! Website management background to view the optimization results.
Enter "webmaster"-"Database"-"Optimization", and you will see that the list of data tables to be optimized is empty, and there is also a prompt below that "the data table is not fragmented and does not need to be optimized", as shown below:
By verifying each other in this way, it can be seen that the "redundancy" of the MySQL data table in the phpMyAdmin page is indeed a database "fragment". And after selecting the redundant data table, the "optimize table" operation can also effectively clean up the fragments of the MySQL database.
In order for the website to run in good condition, the MySQL database fragments of the website should be defragmented regularly.
Thank you for reading this article carefully. I hope it will be helpful for everyone to share too many mysql data fragments and how to solve them. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.