useful:mysql-mariadb
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
useful:mysql-mariadb [2022/08/13 06:50] – admin | useful:mysql-mariadb [2024/03/15 14:36] (current) – admin | ||
---|---|---|---|
Line 60: | Line 60: | ||
The solution I have now used is well described at [[https:// | The solution I have now used is well described at [[https:// | ||
+ | |||
+ | Except that I had a big problem with one connection, and it seems the fix is to change " | ||
+ | |||
+ | |||
+ | ===== Data files under /home directory ===== | ||
+ | |||
+ | By default, this is not allowed and will cause errors. But there are situations where /home is a good place for the data. To fix this in Debian, create and edit this file: | ||
+ | |||
+ | vim / | ||
+ | |||
+ | Set the contents to: | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | 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.1660373449.txt.gz · Last modified: 2022/08/13 06:50 by admin