useful:mysql-mariadb
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
useful:mysql-mariadb [2022/11/27 15:38] – admin | useful:mysql-mariadb [2024/01/29 11:59] – admin | ||
---|---|---|---|
Line 71: | Line 71: | ||
| | ||
| | ||
+ | |||
+ | It should be possible to achieve this without knowing exactly where the file is by using: | ||
+ | |||
+ | | ||
+ | |||
+ | but when I tried, it seemed not to work. | ||
+ | |||
+ | ===== Change collation for all tables in a database ===== | ||
+ | |||
+ | Remember to set the correct name for the database in this code and make sure output file does not exist: | ||
+ | |||
+ | SET @MY_SCHEMA = " | ||
+ | | ||
+ | CONCAT(" | ||
+ | FROM INFORMATION_SCHEMA.TABLES | ||
+ | WHERE TABLE_SCHEMA=@MY_SCHEMA | ||
+ | AND TABLE_TYPE=" | ||
+ | INTO OUTFILE '/ | ||
+ | |||
+ | Then run this command (changing database name as appropriate): | ||
+ | |||
+ | mysql myremos_j41 < / | ||
useful/mysql-mariadb.txt · Last modified: 2024/03/15 14:36 by admin