Get the App
SLTechnology News&Howtos  ›  Database  › 

How phpmyadmin modifies table prefixes

Shulou Source: shulou.com Published: 2022-06-01 01:39:59 10月01日 Update

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!

Tags: Prefix data content database text article statement item code value interest delimiter function backup actual buddy partner datasheet italic italic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Redmi NVidia Docker