restore_database.sh: while restoring the database set value 'max_allowed_packet' to '1G'.
This commit is contained in:
		| @@ -871,6 +871,17 @@ else | |||||||
|    error "$(cat $log_file)" |    error "$(cat $log_file)" | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | # - GET current (global) value for 'max_allowed_packet' | ||||||
|  | # - | ||||||
|  | echononl "   GET current (global) value \033[1mmax_allowed_packet\033[m" | ||||||
|  | CUR_MAX_ALLOWED_PACKET="$(mysql $DATABASE_CREDENTIALS_ARGS -N -s -e "SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'" | awk '{print$2}')" >> $log_file 2>&1 | ||||||
|  | if [[ $? -eq 0 ]];then | ||||||
|  |    echo_ok | ||||||
|  | else | ||||||
|  |    echo_failed | ||||||
|  |    error "$(cat $log_file)" | ||||||
|  | fi | ||||||
|  |  | ||||||
| blank_line | blank_line | ||||||
|  |  | ||||||
| echononl "   Set Autocommit to OFF" | echononl "   Set Autocommit to OFF" | ||||||
| @@ -909,6 +920,15 @@ else | |||||||
|    error "$(cat $log_file)" |    error "$(cat $log_file)" | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | echononl "   Set max_allowed_packet to 1G" | ||||||
|  | mysql $DATABASE_CREDENTIALS_ARGS -N -s -e "SET GLOBAL max_allowed_packet=1073741824" >> $log_file 2>&1 | ||||||
|  | if [[ $? -eq 0 ]];then | ||||||
|  |    echo_ok | ||||||
|  | else | ||||||
|  |    echo_failed | ||||||
|  |    error "$(cat $log_file)" | ||||||
|  | fi | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -991,6 +1011,16 @@ else | |||||||
|    error "$(cat $log_file)" |    error "$(cat $log_file)" | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | echononl "   Set max_allowed_packet to $CUR_MAX_ALLOWED_PACKET" | ||||||
|  | mysql $DATABASE_CREDENTIALS_ARGS -N -s -e "SET GLOBAL max_allowed_packet=$CUR_MAX_ALLOWED_PACKET" >> $log_file 2>&1 | ||||||
|  | if [[ $? -eq 0 ]];then | ||||||
|  |    echo_ok | ||||||
|  |    CUR_MAX_ALLOWED_PACKET="" | ||||||
|  | else | ||||||
|  |    echo_failed | ||||||
|  |    error "$(cat $log_file)" | ||||||
|  | fi | ||||||
|  |  | ||||||
| blank_line | blank_line | ||||||
|  |  | ||||||
| # - Start Apache Webserver | # - Start Apache Webserver | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user