Added the script to fix the clients anrs table limit.

pull/342/head
Ruslan Baidan 2021-03-01 12:08:45 +01:00
parent 75a27c08fc
commit 6b1b9e58a6
No known key found for this signature in database
GPG Key ID: 4B7724C136BF1D89
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#! /usr/bin/env bash
for conf_file in /var/www/*/local.php
do
db_user=$(grep 'user' $conf_file | head -1 | sed "s/'user' => '//" | sed "s/',//" | sed 's/^[ \t]*//;s/[ \t]*$//')
db_pwd=$(grep 'password' $conf_file | head -1 | sed "s/'password' => '//" | sed "s/',//" | sed 's/^[ \t]*//;s/[ \t]*$//')
echo "Alter anrs table raw size for $db_user ..."
mysql -u $db_user -p$db_pwd $db_user -e "ALTER TABLE anrs ROW_FORMAT=DYNAMIC;"
echo "Done."
done