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

How phpmyadmin modifies table prefixes

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

Share

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

This article mainly introduces phpmyadmin how to modify the table prefix, the article is very detailed, has a certain reference value, interested friends must read it!

phpmyadmin How to modify table prefixes?

In this example, suppose you modify the table with prefix "phpcms_" in the database named "www_sdck_cn" and modify the prefix of all eligible tables to "sdck_."

1. Open the database www_sdck_cn to modify the prefix with phpMyAdmin and execute the following SQL statement (where bold italics need to be replaced according to actual needs):

Select CONCAT( 'ALTER TABLE ', table_name, ' RENAME TO ', replace(table_name,'phpcms_','sdck_'),';')from information_schema.tableswhere TABLE_SCHEMA = 'www_sdck_cn' and table_name LIKE 'phpcms_%';

2. Click "Export" on the page generated by executing SQL statement, select "Custom"->"Display directly as text", CSV format, clear "Content separator" to blank

3. After executing the export function, reach the result window as follows, copy the contents in the text box

4. Enter the SQL execution window of the database "www_sdck_cn", paste the code into the SQL text box, and execute. Check if the relevant data tables have been modified.

precautions

Data manipulation is risky, please backup data before manipulation.

The above is "phpmyadmin how to modify the table prefix" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to 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