/opt/dedrads/__pycache__
NameSizeModeActions
alp.cpython-313.pyc188170644editdlrm
check_prov.cpython-313.pyc63940644editdlrm
clean_exim.cpython-313.pyc89020644editdlrm
cmspass.cpython-313.pyc63780644editdlrm
cms_check.cpython-313.pyc140790644editdlrm
cms_counter.cpython-313.pyc329480644editdlrm
cpanel_postgres_manager.cpython-313.pyc407620644editdlrm
docroot.cpython-313.pyc54920644editdlrm
envinfo.cpython-313.pyc81840644editdlrm
exclude_rbl.cpython-313.pyc66820644editdlrm
first_setup.cpython-313.pyc204930644editdlrm
fixwpcron.cpython-313.pyc72230644editdlrm
innodb_converter.cpython-313.pyc143470644editdlrm
mail_sources.cpython-313.pyc99690644editdlrm
modsec_disable.cpython-313.pyc158380644editdlrm
mysql_selector.cpython-313.pyc867480644editdlrm
show-conns-adv.cpython-313.pyc684140644editdlrm
sparta.cpython-313.pyc4909030644editdlrm
vhost_data.cpython-313.pyc69830644editdlrm
Edit: /opt/dedrads/__pycache__/mysql_selector.cpython-313.pyc (86748B)
}jSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSK r SSK J r SSSSSS.r S rS rS rS rS rSqSqSqSrSqSqSqSqSSSSS.rSrSrSrSrSr Sr!Sr"Sr#S\#"5S3q\ RH"S5r%ScSjr&SdSjr'Sr(S r)S!r*S"r+SeS#jr,S$r-S%r.S&r/S'r0S(r1S)r2ScS*jr3SfS+jr4S,r5SfS-jr6S.r7SfS/jr8SfS0jr9S1r:S2r;S3rS6r?S7r@S8rAS9rBS:rCS;rDS<rES=rFS>rGS?rHS@rISArJSBrKSfSCjrLSDrMSErNSFrOSGrPSHrQSIrRSJrSSKrTSLrUSgSMjrVSNrWSOrXSPrYSQrZSRr[SSr\STr]SUr^SVr_SWr`ShSXjraSYrbSZrcS[rdS\reS]rfS^rgS_rhS`riSarj\kSb:Xa\j"5 gg)iN)which)mariadbz10.11)r10.6)rz11.4)mysql8.0)rz8.4) mariadb1011 mariadb106 mariadb114mysql80mysql84z/var/cpanel/cpanel.config/var/lib/mysqlz/rootz /root/.my.cnfz /etc/my.cnfF512Mutf8mb4_unicode_ci utf8mb4_bin)utf8mb4_0900_ai_ciutf8mb4_0900_as_ciutf8mb4_0900_as_csutf8mb4_0900_bin)zcpanel-zea-z^(mysql-server|mysql-client|mysql-common|mysql-community-server|mysql-community-client|mysql-community-client-core|mysql-community-server-core|mysql-apt-config)(?:$|-)zY^(mariadb-server|mariadb-client|mariadb-common|mariadb-backup|galera-[0-9]+|socat)(?:$|-)z@^(mysql|mysql-community|mysql[0-9]|mysql[0-9]+-community)(?:$|-)z6^(mariadb|MariaDB|galera|socat|boost-.*mariadb)(?:$|-)c nSUS[S[=(d SS[SUSUS3 n[U5 g ) z Display detailed usage guidance.zdmysql_selector.py - Install or switch MySQL/MariaDB on cPanel (AlmaLinux 8+ / Ubuntu 24+) Usage: ai [--dry-run] [--force] [--log-file=/path/to/log] Targets (key -> engine/version): mariadb1011 -> MariaDB 10.11 (LTS) mariadb106 -> MariaDB 10.6 mariadb114 -> MariaDB 11.4 mysql80 -> MySQL 8.0 mysql84 -> MySQL 8.4 What this script does: - Verifies the host is AlmaLinux 8+ or Ubuntu 24+. - Backs up all non-system databases to a/mysql-backup-. - Stops existing MySQL/MariaDB services and removes conflicting packages. - Sets the requested version in cPanel config, then triggers WHM's installer. - Rewrites MySQL 8-only utf8mb4_0900 collations during MySQL-to-MariaDB restores. - Falls back to manual installs for supported RPM versions if WHM install fails. - Ensures /root/.my.cnf credentials work and restores databases + grants. - Writes a log to z a (or a custom --log-file). Expectations and prerequisites: - Run as root on a cPanel server (whmapi1 required for the primary path). - /root/.my.cnf must contain working root credentials; backups are not deleted. - Sufficient free space (>5% headroom) is required on a for backups. Options: --dry-run Skip destructive commands (package removals, globs) and prompt before deletion. --force Proceed with deletions/removals without prompting (overrides prompts). --log-file=PATH Write log output to PATH instead of the default in /root. -h, --help Show this help. Exit codes: 0 on success, non-zero on error. Examples: z mariadb114 z mysql84 N) BACKUP_ROOTLOG_FILE_DEFAULTlog)prog help_texts /opt/dedrads/mysql_selector.py show_helpr8sg& *+67 &4569 :E F& & M'IP Nc\[RR5RS5$)Nz%Y-%m-%dT%H-%M-%S)datetimenowstrftimerrtsr#es#    " + +,? @@rz/root/mysql_selector-z.logmysql_selectorcU=(d [n[R"5/nUR[R"U55 Uq[R"[RSUSS9 g![ agnUSR [R5 [R"[RSUSS9 [RSX5 SnAgSnAff=f)z-Initialize logging to both stderr and a file.rz %(message)sT)levelformathandlersforcez"[!] Unable to open log file %s: %sN) rlogging StreamHandlerappend FileHandler ExceptionsetLevelINFO basicConfigLOGGERwarning)log_filetargetr(es r init_loggingr7ms ))F%%'(H ++F34! ll    W\\*,,   ;VG s'A44 C%>AC  C%c2[R"U/UQ76 g)z0Log script output through the configured logger.N)r2info)messageargss rrrs KK$rc*[b[$0n[S5nUH@nSU;dM UR5RSS5up4URS5X'MB SSS5 UR SS5nUR SS5R 5nUR S S5n[URS 5S 5nUUUUS .q[$!,(df  N}=f![a 0nNf=f![[4a S nNDf=f) zr>Nr`z@[!] Ubuntu version {} detected. Version 24.04 or newer required.zH[!] This script supports only AlmaLinux 8+ or Ubuntu 24+ cPanel systems.)rWrr'sysexit)os_inforVrGrHs rcheck_os_supportrismG DMEi G G E  19 QXX*{  HHQK  2: RYY*{  HHQKRHHQKrc[(aU(a[SU35 g[U[5(a[R "U5n[S[R "U5-5 [R"U5nU(a0URS:wa [R"UR5 UR$)Nz[dry-run] Skipping command: r+ ) DRY_RUNr isinstancestrshlexrLjoin subprocessrun returncoderfrg)cmdcheck destructiveps rrrrrsw; *3% 01#skk#uzz#sA "  <<rcb[U[5(a[R"U5n[R "U[R S9RSS5$![Ra/nUR=(d SRSS5sSnA$SnAf[a gf=f)Nstderrutf-8replacerrA) rmrnrorLrq check_outputSTDOUTdecodeCalledProcessErroroutputFileNotFoundErrorrtr6s routrs  c3  ++c"C&&s:3D3DELL Y    ( (<C'';; s$AA B.4$BB. B.-B.cDUR5nSU;=(a SU;$)zHReturn True for client compatibility warnings mixed into command output.zDeprecated program namezuse '/usr/bin/mariadb' instead)rK)rSs ris_mysql_client_noisers' ::>Cc<SR[55n[R"SU[R5(d+[R"SU[R5(ag[R"SU[R5(agg)N z\bmysql-community-server\bz\bmysql-server\brz#\b(mariadb-server|MariaDB-server)\brnone)rpinstalled_packagesresearchI)pkgss rinstalled_familyrsl 99') *D yy.bdd;;ryyT244@@ yy7rttDD rcJ[S5nU(dg[US/SS9nUS:H$)N mysqladminFpingrur)rrr)rrcs r ping_mysqlrs,|$J  j& ! /B 7Nrcx[RRU5(d[R"USS9 gg)NTexist_ok)ospathisdirmakedirs)ds r ensure_dirrs( 77==   A% rc Uc[OUn/nUH(nUR[R"U55 M* [[ U55nU(dg[ S5 UHn[ SU35 M [ (a [ S5 gU(dC[ S5 [5R5R5nUS;a [ S5 gUHyn[RRU5(a;[RRU5(d[R"USS 9 Mc[R "U5 M{ g!["a M[$an[ S US U35 SnAMSnAff=f) zBRemove files/dirs matching glob patterns without invoking a shell.Nz[*] Paths matched for removal: z-[dry-run] Skipping deletion of matched paths.z[?] Remove these paths? [y/N]: yyesz%[!] Skipping removal by user request.T) ignore_errorsz[!] Unable to remove r) FORCE_DELETEextendglobsortedsetrrlinputrKrNrrrislinkshutilrmtreeremoverr.)patternsr)matchespatransr6s rremove_matchesrs/!MLuEGtyy~&S\"G () d4&Mw ;<  -.gmmo##% l " 7 8  5ww}}T""277>>$+?+? d$7 $  !   5 'vRs3 4 4 5s%!AEE F ( F 1FF cU(d[c[SS/5R5q[R"U[R 5n[Vs/sHo2R U5(dMUPM sn$s snf)z9Return rpm -qa entries matching regex (case-insensitive).rpmz-qa) _RPM_CACHEr splitlinesrcompilerr)regexrefreshpatternrws rrpm_packages_matchingr?sX*$%(335 jj%G! 7z!^^A%6Az 77 7s A=4A=cSqg)z3Clear cached rpm -qa results after package changes.N)rr"rrinvalidate_rpm_cacherHs JrcU(d[c/n[/SQ5nUR5HenUR5n[ U5S:dM$USR S5(dM?UR USRS5S5 Mg [[U55q[R"U[R5n[Vs/sHovRU5(dMUPM sn$s snf)zFReturn installed dpkg package names matching regex (case-insensitive).) dpkg-query-Wz)-f=${binary:Package} ${db:Status-Abbrev} iir:) _DPKG_CACHErrrLlen startswithr,rrrrrr)rrpackagesrawrSpartsrrws rdpkg_packages_matchingrNs+%  NN$DJJLE5zQ59#7#7#=#=as 3A 67%S]+ jj%G" 8{!nnQ&7A{ 88 8s C>5C>cSqg)z5Clear cached dpkg package list after package changes.N)rr"rrinvalidate_dpkg_cachercs KrcH[5(a [SUS9$[SUS9$)Nz.*rrbrrrs rrris#{{%eW==  88rcD[5(a [XS9$[XS9$)Nrr)rrs rpackages_matchingros{{%e==  88rc,UR[5$N)rPROTECTED_DEB_PACKAGE_PREFIXESpackages ris_protected_deb_packageru   < ==rc,UR[5$r)rPROTECTED_RPM_PACKAGE_PREFIXESrs ris_protected_rpm_packageryrrcUVs/sHn[U5(dMUPM nnU(a)[SRSRU555 UVs/sH oU;dM UPM sn$s snfs snfNz7[!] Refusing to remove protected cPanel/EA packages: {} )rrr'rprpkg protecteds rfilter_protected_deb_packagesr}j (J,DS,IIJ E L L#  $ <8C)';C8 <<K =A/A/ A4&A4cUVs/sHn[U5(dMUPM nnU(a)[SRSRU555 UVs/sH oU;dM UPM sn$s snfs snfr)rrr'rprs rfilter_protected_rpm_packagesrrrc [SS/U-5n/nUR5HUn[R"SU5nU(dM#UR UR S5R S5S5 MW [[U55$)Napt-getz-sz^(?:Remv|Purg)\s+(\S+)r>rr) rrrmatchr,grouprLrr)r;rremovalsrSrs rapt_planned_removalsrsw y$$& 'CH 2D9 5 OOEKKN005a8 9! #h-  rc[U5nUVs/sHn[U5(dMUPM nnU(a*[SRSR U555 ggs snf)NzI[!] Refusing apt operation because it would remove protected packages: {}rTF)rrrr'rpr;rrrs rapt_plan_has_protected_removalsrY#D)H (J,DS,IIJ  !6#((9"56  K A"A"cn[SS/U-5n/nSnUR5HnUR5nU(dMURS5(aSnM6URS5(aSnMPURS5(aSnMjU(dMsURS5(dBURS 5(d,URS 5(dURS 5(aMUR 5S nU(dMUR U5 M [ [U55$) Ndnfz --assumenoF) Installing Upgrading Downgrading ReinstallingRemovingTzTransaction Summaryr=-zPackage zArch r)rrrKrrLr,rr)r;rrin_removal_sectionrSstrippedrs rdnf_planned_removalsrs ul#d* +CH ::<     F  "'     z * *!%     4 5 5!&  !     $ $""3''"":..""7++ .."1% 7 OOG $5!6 #h-  rc[U5nUVs/sHn[U5(dMUPM nnU(a*[SRSR U555 ggs snf)NzI[!] Refusing dnf operation because it would remove protected packages: {}rTF)rrrr'rprs rdnf_plan_has_protected_removalsrrrc,[5 [5 gr)rrr"rrinvalidate_package_cacher src^[U5nU(dg[/SQU-SSS9 [5 g)N)r-ez--nodepsFTrurv)rrrr )rs rrpm_force_remover s0,X6H !H, rc0U(dg[5(a;[U5nU(dgSS/U-n[U5(ag[S/U-SSS9 O:[ U5nU(dgS/U-n[ U5(ag[SS/U-SSS9 [ 5 g) N-ypurgerFTr rr)rbrrrrrrr )rapt_argsdnf_argss rpackage_removers {{0: '?X- *8 4 4  K( " 1: :( *8 4 4  UDMH $EtDrc[5(a%/SQn[U5(ag[S/U-SSS9 O$S/n[U5(ag[SS/U-SSS9 [ 5 g) N)r autoremovez--purgerFTr rrr)rbrrrrr )rrs rpackage_autoremoversf{{2 *8 4 4  K( " !> *8 4 4  UDMH $EtDrcT[5(a [SS/SS9 g[/SQSS9 g)NrcleanFrrrall)rbrrr"rr package_cleanrs#{{ Y . #51rc [R"SS[/[RS9R SS5nUR 5R 5Sn[U5$![Ra9n[S[SURR SS535 S nAg S nAf[an[S[SU35 S nAg S nAff=f) z3Return total size of DATADIR in bytes using du -sb.duz-sbryr{r|rz[!] Unable to measure z size: N) rqr}DATADIRr~rrKrLrOrrrr.)rsize_strr6s restimate_datadir_sizer s :(( 5' ":+<+< &) $ <<>'')!,8}  ( (  $WIWQXX__Wi5X4Y Z   : $WIWQC 899 :s$A%A((C[!] Unable to determine MySQL data size; refusing to continue.g?z[i] Backup filesystem total: @z.2fz GB, free: z GB, datadir size: z GBz*[!] Not enough free space: projected free z$ GB would drop below 5% of capacity.T) rstatvfsrr.rf_blocksf_frsizef_bavailr )statr6totalavail datadir_sizemin_freeprojected_frees rhas_sufficient_space_for_backupr-,szz+& MMDMM )E MMDMM )E(*L LMt|H)N '(9#'>k%SZJ[\_I``suAELuMNQtRRU V  879STW8XX| }  +  ;K=1# N  sB++ C5CCc [U5 [RRUS[ 5-5n[R "USS9 [ SU35 Sn[5(d[ S5 US4$[S5(a[S 5(d[ S 5 US4$/n[ S 5 [S5S S /n/n[U5R5HBn[U5(a[ SUR535 M1URU5 MD U(d [ S5 OQ1SknUVs/sH@nUR5(dMUR5U;dM0UR5PMB nnU(d[ S5 US4$[ SRSRU555 UHn[RRXS35n [ SU35 [S 5SSSSSSSU/ n [U S5n [ R""XSS9 S S S 5 [ S!US"U 35 M [RR/S'5(a,[#S(S)S*[RRUS+5/S,S-9 X4$s snf!,(df  N|=f![ R$a`n [ S#US$U 35 Sn[RR'W 5(a[R("U 5 S n A GMYS n A GM`S n A f[*ain [ S%US$[-U 535 Sn[RR'W 5(a[R("U 5 S n A GMS n A GMS n A ff=f![*a$n [ S&[-U 535 SnS n A GNzS n A ff=f).zDump all non-system databases and copy cPanel metadata if present. Returns (backup_directory, status) where status in {"ok","empty","error"}. z mysql-backup-Trz[*] Backing up to: okz7[!] MySQL server is not running, cannot perform backup!errorr mysqldumpzB[!] mysql or mysqldump command not found, skipping database backupz [*] Getting list of databases...-NBeSHOW DATABASESz#[i] Ignoring MySQL client warning: z![*] No databases found to back up>rfrinformation_schemaperformance_schemaz&[*] No user databases found to back upemptyz![*] Backing up user databases: {}, .sqlz[*] Backing up database: --defaults-file=/root/.my.cnfz--single-transactionz--quickz --routinesz--eventsz --triggersz --hex-blobw)rruNz[+] Successfully backed up z to z[!] Error backing up database rz)[!] Unexpected error backing up database z![!] Error during backup process: /var/cpanel/databases/usr/bin/rsync-aH/var/cpanel/databases/cpanel_databasesFr)rrrrpr#rrrrrrrrKr,r'rJrqrrrexistsrr.rnr) rootdirbdirstatususer_dbsdbs_cmddbsrS system_dbsdb backup_filedump_cmdrRr6s r backup_allrKHsaw 77<<24!7 8DKKt$ dV$% F << EFW} >>{!3!3 P W}HK ./>6+;<L++-D$T**9$**,HI JJt  .  3 4JB88:"$((*J">    8 9= 3::499X;NO  "/"$'',,tt4["AK3B489k*7.!$"$$ Hk3/1"xF05bTk]KL-T ww}},--  ( T#56     <ID0/ "44/8BqcBC$Fww~~k22 +..3 /CB4r#a&R%Fww~~k22 +..3 /  /Ax 89s,BN$J&J&4J&N$ .N$AJ<J+5J<N$&N$+ J9 5J<<N!A L+N$+ N!8ANN$N!!N$$ O.O  OcUR5nU[;a [U$URS5(a.URS5(dURS5(aggU$)zCMap MySQL-only utf8mb4 collations to MariaDB-compatible collations. utf8mb4_0900__bin_csrr)rNMYSQL_TO_MARIADB_COLLATION_MAPrendswith) collationlowereds rmariadb_compatible_collationrTs`ooG00-g66/**   F # #w'7'7'>'> # rc f^ ^ [R"S[R5m US-n0m [USSSS9n[ U 4SjU55(d UsSSS5 $SSS5 [USSSS9n[US SS 9nUH)nU 4S jnUR T R XT55 M+ SSS5 SSS5 [S5 [T R55Huupxn [SUSUSU S35 M U$!,(df  N=f!,(df  Nn=f!,(df  Nw=f![ain[RRU5(a[R"U5 O![a Of=f[S US U35 UsSnA$SnAff=f)zRCreate a MariaDB-compatible copy of a MySQL dump if collation rewrites are needed.z\butf8mb4_0900_[A-Za-z0-9_]+z.mariadb-collation-fix.tmprr{r|encodingerrorsc3F># UHnTRU5v M g7fr)r).0rSrs r 8normalize_dump_collations_for_mariadb..s<w~~d++s!Nr:)rXc~>URS5n[U5nX!:waTRX4S5S-TX4'U$)Nrr>)rrTrM)roriginal replacement replacementss rrepl3normalize_dump_collations_for_mariadb..replsM${{1~H">x"HK".(,,h-DaH1L%h%<='&rz&[!] Unable to normalize collations in rz5[*] Rewrote MySQL-only collations for MariaDB import:r ->  ())rrrrJanywritesubr.rrr@rrritems) sql_pathtmp_pathsrcdstrSrbr6r_r`countrras @@r%normalize_dump_collations_for_mariadbrpsjj8"$$?G66HL (C') D<<<<E D<E(C') DT cGN ' '++d12N D.?@*01C1C1E*F& d8*D Rwa 89+G O=E DN N D D  ww~~h'' (#    4XJb DEs D=D  D=#D=7 D,0D3D,;D= DD= D) %D,, D:6D=:D== F0:FF+ F F+FF+%F0+F0c "U(a$[RRU5(d [S5 g[ [ 5 [ SSSS9(d [S5 g[S5nU(d [S 5 g[[R"U5Vs/sHo3RS 5(dMUPM sn5nU(d[S U35 gSnUGHn[RRU5S nUS ;aM.[RRX5n[SUSU35 Un Sn U(a[U5n X:waU n SUS3n U(aU S- n [USS[ 3SU /SS9 [U SSS9n[ R"USS[ 3U/USS9 SSS5 [SU35 U (a[R$"U 5 GMGM [RRUS 5n [RRU 5(a[S!S"U S#-S$/SS9 [S%5 U$s snf!,(df  N=f![ R"an [SUSU 35 SnSn A NSn A ff=f![&an [SU SU 35 Sn A GMSn A ff=f!U (a@[R$"U 5 f![&an [SU SU 35 Sn A fSn A ff=ff=f)&zSRestore all SQL dumps found in backup_dir (user DBs only). Returns True on success.z9[!] Backup directory missing or invalid, skipping restoreFiXTtimeoutinterval require_authz@[!] MySQL/MariaDB service is not ready; cannot restore databasesrz,[!] mysql client not found, skipping restorer8z%[*] No SQL dumps found to restore in r)rrfz[*] Restoring database: z from NzCREATE DATABASE IF NOT EXISTS `z` DEFAULT CHARACTER SET utf8mb4z COLLATE utf8mb4_unicode_cir9z--max_allowed_packet=r rr{r|rW)stdinruz [+] Restored z[!] Failed to restore rz+[!] Unable to remove temporary import file r?r<r=/r>z+[*] Restored /var/cpanel/databases metadata)rrrrset_server_max_allowed_packetMAX_ALLOWED_PACKETwait_for_mysql_readyrrlistdirrQsplitextrprprrrJrqrrr.) backup_dirfix_mysql_to_mariadb_collations mysql_binrR sql_files restore_okfnamerHfpath import_pathtemp_import_path create_stmtr6cp_srcs rrestore_all_databasesrs RWW]]:66 GH!"45 ad K N gI  :;JJz*A*qjj.@*AI  3J< @AJ WW  e $Q ' ! !  Z/ &rd& 89 ) .CEJ ''2$;B4?^_K.<< 3+,>+?@  kGIF!!7/0B/CD   G -t$ %  II./ WfWW\\*&8 9F ww}}V ufsl4L M  9: A BBGF,,  (Bqc2 3J !EFVEWWYZ[Y\] II./ EFVEWWYZ[Y\] sI;IA I'"I3I'J I$ I''J;JKJK K%J==KLK%$L% L /L LL LcL[/SQSS9 [/SQSS9 [/SQSS9 g)N) systemctlstopmysqldFr)rrr)rrrrrr"rrstop_dbr?s#'u5&e4(6rc[RR[5(ae[RR [5(d<[S-[ 5-n[ S[SU35 [S[U/SSS9 ggg)Nz.off-z[*] Parking datadir: rdmvTr )rrrrrr#rrr)parkeds r park_datadirrEsi ww}}WbggnnW&=&=7"RT) #G9D 9: T7F #4TB'>rc[SS/5nU(dg[R"SU5nU(aURS5$g![an[ SU35 SnAgSnAff=f)Nrz --versionz(?:Ver )?(\d+\.\d+)r>z/[!] Could not determine current MySQL version: )rrrrr.r)rrr6s rget_current_mysql_versionrLss Cg{+, 0&9 ;;q> !   C =aS ABB CsA.A A*A%%A*c[S5 [5 [5 [S5 [5(a[ /SQ5 O%[ /SQSS9 [ /SQSS9 [ /SQ5 [S 5 [5(a[ O[n[U5nU(ap[S S RU535 [U5 [US S 9nU(a7[5(a([SS RU535 [U5 [5(a[SS S 9nU(a [U5 [S5 [ /SQ5 [5 [5 [S5 g)Nz1[*] Stopping MySQL service and parking datadir...z3[*] Removing MySQL package manager configuration...)#/etc/apt/sources.list.d/mysql*.list&/etc/apt/sources.list.d/mysql*.sourcesz!/etc/apt/trusted.gpg.d/mysql*.gpgrrmoduleresetrFrrrrdisabler)/etc/yum.repos.d/mysql*.repoz'/etc/yum.repos.d/mysql*-community*.repoz/etc/yum/repos.d/mysql*.repoz[*] Removing MySQL packages...z$[*] Found MySQL packages to remove: rTrz-[*] Force removing remaining MySQL packages: zC^(mysql-community|mysql80-community|mysql84-community|numactl-libs)z.[*] Cleaning up MySQL files and directories...)/var/lib/mysql*z/var/run/mysql* /etc/my.cnf* /etc/mysql*/usr/lib64/mysql*/usr/lib/mysql*/usr/share/mysql*z[*] MySQL removal completed)rrrrbrrrMYSQL_DEB_PACKAGE_REGEXMYSQL_RPM_PACKAGE_REGEXrrprr^r rr) mysql_regex mysql_pkgs remaining extra_pkgss rremove_mysql_familyrZs8;< IN=>{{   5UC 7uE  () ;; $ #;/J 2388J3G2H IJz"%k4@  ?@S?TU  Y '{{& R   : &89  O%&rc[S5 [5 [5 [S5 [5(a[ /SQ5 O%[ /SQSS9 [ /SQSS9 [ /SQ5 [S 5 [5(aS [ S [S 3OS [S [S 3n[US S9nU(a [U5 [US S9nU(a7[5(a([SSRU535 [U5 [S5 [ /SQ5 [5 [!5 [S5 g)Nz3[*] Stopping MariaDB service and parking datadir...z5[*] Removing MariaDB package manager configuration...)z%/etc/apt/sources.list.d/mariadb*.listz(/etc/apt/sources.list.d/mariadb*.sourcesz#/etc/apt/trusted.gpg.d/mariadb*.gpgrr)rrrrrFr)rrrrr)z/etc/yum.repos.d/MariaDB*.repoz/etc/yum/repos.d/mariadb*.reporz.[*] Removing all MySQL and MariaDB packages...(?:|rfTrz([*] Found remaining packages to remove: rz6[*] Cleaning up configuration files and directories...) rz/var/run/mariadb*z/var/run/mysqld*rrz /etc/mariadb*rrrz/usr/bin/mysql*z/usr/sbin/mysql*z#[*] MariaDB/MySQL removal completed)rrrrbrrrrMARIADB_DEB_PACKAGE_REGEXrMARIADB_RPM_PACKAGE_REGEXrrr^rpr rr)db_regexpkg_listremaining_pkgss rremove_mariadb_familyrs => IN?@{{   7uE 9G  89 ;; % &a(A'B!D*+1-F,Gq I !48Hx 'x>N)++ 6sxx7O6P Q  (@A "O-.rcSn[RRU5(a[S5 [ US/SS9 g[S5 g)z8Install required Perl modules used by cPanel DB tooling.z+/usr/local/cpanel/scripts/check_cpanel_pkgsz<[*] Ensuring cPanel Perl modules via check_cpanel_pkgs --fixz--fixFrzS[!] /usr/local/cpanel/scripts/check_cpanel_pkgs not found; skipping Perl module fixNrrr@rrr) check_pkgss rensure_perl_mysql_modulesrs??J ww~~j!! JK Z !/ a rc0[SRU[55 [SS[[S-[ 5-/SS9 [ [5nUR5RS5nSSS5 Sn/nWHQnUR5RS5(aURSUS 35 SnM@URU5 MS U(d@U(a$US RS 5(d US S -US 'URSUS 35 [S -n[ US 5nURU5 UR5 [R "UR#55 SSS5 [R$"U[5 [S U35 Sn[ [5nUH9nUR5RS5(dM)UR5n O SSS5 [SR[U=(d S55 g![ a GNf=f!,(df  GN=f![ a /nGNf=f!,(df  N=f!,(df  N~=f![ a SnNf=f)Nz1[*] Setting mysql-version={} in {} (Python write)z/bin/cp-az.bak-FrTzmysql-version=rrz.tmpr:z[+] mysql-version set to rAz z[=] [{}] -> {}z )rr' CPANEL_CONFIGrrr#r.rJreadrrKrr,rQ writelinesflushrfsyncfilenor|) verrRlinesfound new_linesrStmpcurls rset_cpanel_mysql_versionrs*;BB     m]W-Drt-K L  - AFFH''-E! EI ::< " "#3 4 4   ~cU"5 6E   T "   Yr]33D99%bMD0IbM>#b12 & C c31 Y    JJsM" #C5)* C - A779''(899'')C! s/AkBCO    ! $ ! s$H.I H?5I4AI$.J=(I5)I5=J. H<;H<? I II I! I!$ I25 J?JJ JJc[/SQ5n/n[R"U5nURS5=(d 0RSS5n[ R "SU5nU(a;[5nUVs/sH$ofU;aM URU5(aM"UPM& nnU$![a UnNif=fs snf)N)/usr/sbin/whmapi1start_background_mysql_upgradezversion=__probe__z --output=jsonmetadatareasonrAu[“\"]([0-9]+\.[0-9]+)[”\"]) rjsonloadsrMr.rfindallradd)rallowedjrversseenrUs r whm_allowedr-s   CG JJsO%% #)r..x< ::7 @D u"Ed91 1dE N  Fs$AB,= B> B>"B>, B;:B;c[S5 [SSSU3/SS9nUS:wa [S5 g[S 5 [S 5 [S 5 g ) Nu4[*] Triggering WHM MySQL/MariaDB install/upgrade …rrzversion=Frrz#[!] WHM did not accept the request.z=== TRIGGERED ===z8Track with: whmapi1 get_mysql_upgrade --output=json|yamlzlIf datadir was parked, restore **after** engine is up, then run: /usr/local/cpanel/bin/restoregrants --forceTrrr)rrs rwhm_start_upgraderCsf>?  ,se    B Qw 12BCv rc[R"5n[R"5U- U:a[S5nU(d[R"U5 MF[R"US/[R [R S9nURS:XagURRSS5nU(dSU;a [S 5 g[R"U5 [R"5U- U:aMg ) zlWait until MySQL responds to mysqladmin ping. If require_auth=False, treat 'Access denied' as service-ready.rrrrTr{r|z Access deniedzH[i] MySQL service responding but root authentication failed; continuing.F) timersleeprqrrPIPEr~rsrrr)rtrurvstartrprocrs rr{r{Ys IIKE ))+  '<(  JJx ~~  ??$$  ??a ##GY76 9 Z  8% ))+  '& rc[SUS35 [S5(d [S5 g[U5(dg[S5 [5(a [S5 g[S 5 g) Nz[*] Requesting MySQL/MariaDB z via cPanel API...whmapi1z6[!] whmapi1 not found; cannot use cPanel API installerFz2[*] Waiting for database service to come online...z0[+] Database service is online after API requestTzZ[!] Database service did not come online in expected time; check whmapi1 get_mysql_upgrade)rrrr{) target_vers rinstall_with_cpanel_apirssh ' |3EFG    DE Z ( (<= >?d rc[R"S[U55nU(dU$[UR S55nUR S5=(d SR 5nSSSSS.Un[X$-5$) zFConvert MySQL client size suffixes to bytes for SET GLOBAL statements.z^\s*(\d+)\s*([KkMmGg])?\s*$r>rrAiir")rAKMG)rrrnrOrupper)valuersizesuffix multipliers rmysql_size_to_bytesrsy HH3SZ @E  u{{1~ Dkk!n" ) ) +F      J t !!rc 2Sn[S5nU(a([RR[5(dg[ cU"5q[ US[-SS[U5S3/SS 9 g![an[S US U35 SnAgSnAff=f) z6Raise server/client max_allowed_packet before imports.c[S5nU(a([RR[5(dg[ US[-SS/5nUR 5R5nU(aUS$g![a gf=f)Nr--defaults-file=r2z(SHOW VARIABLES LIKE 'max_allowed_packet'r) rrrr@ ROOT_MYCNFrrKrLr.)mysql_bin_innerrrs r_current_packet6set_server_max_allowed_packet.._current_packets.bggnnZ&@&@ #&3> CIIK%%'ERy   s?A?? B  B rNrr SET GLOBAL max_allowed_packet=;Frz([!] Unable to set max_allowed_packet to r) rrrr@rORIGINAL_MAX_ALLOWED_PACKETrrrr.r) packet_sizerrr6s rryrys(gI BGGNN:66"*&5&7# K "Z/01D[1Q0RRST     K 6{m2aS IJJKs"A11 B;BBcJ[(dg[S5nU(a([RR [ 5(dg[ US[ -SS[S3/SS9 [S [35 g![an[S [S U35 SnAgSnAff=f) z>Revert max_allowed_packet to original value if it was changed.Nrrr rrFrz#[+] max_allowed_packet reverted to z,[!] Unable to restore max_allowed_packet to r) rrrrr@rrrrr.)rr6s rrestore_max_allowed_packetrs ' &gI BGGNN:66  "Z/01L0MQO     12M1N O    :;V:WWYZ[Y\ ]   s /A99 B"BB"c|[RRS5(a[S5 [ SS/SS9 gg)N/usr/local/cpanel/scripts/upcpz6[*] Running /usr/local/cpanel/scripts/upcp --force ...--forceFrrr"rrrun_upcp_forcers4 ww~~677 DE -y 9G8rc2[RR[5(d[ S[S35 g[R "[S5 [ S[S35 g![ an[ S[S U35 S nAgS nAff=f) z7Ensure cPanel UI code can read the global MySQL config.z[!] z1 does not exist; skipping cPanel readability fix.Fiz[+] Set z, permissions to 0644 for cPanel readability.Tz[!] Unable to set z permissions: N)rrr@ ETC_MYCNFrchmodr.)r6s r#ensure_cpanel_readable_mysql_configrs{ 77>>) $ $ d9+N OP E" hyk!M NO    >! =>s.A-- B7BBcn0n[RR[5(dU$[ [5nUHnUR 5nU(a,UR S5(dUR S5(aMHSU;dMPURSS5up4UR 5R5nUR 5nUS;aX@S'MUS;dMX@S'M SSS5 U$!,(df  U$=f![a n[S [S U35 SnAU$SnAff=f) N#[r=r>)userusernamer)passwordpassrz[!] Unable to read r) rrr@rrJrKrrLrNr.r)credsrRrSrTrUr6s rread_my_cnf_credentialsr s E 77>>* % % 5 * zz|ts33ts7K7K$;::c1-DA )A A00()f 22,-j) L  L 5 !*Rs 344 L5sBD AC8AC8&C8.D 8 DD D D4D//D4c[[S5nURS5 URSUS35 URSUS35 SSS5 [R"[S5 [ S[S 35 g !,(df  N==f![ an[ S [S U35 SnAg SnAff=f)z.Write /root/.my.cnf with provided credentials.r:z [client] zuser=rz password=Niz [+] Wrote z with provided credentials.Tz[!] Failed to write rF)rJrrhrrrr.)rrrRr6s rwrite_root_mycnfr s  *c "a GGL ! GGeD6$ % GGiz, -# U# j $? @A # "  ":,b 45s.B> &3T;G!!!! D ??a rc[RR[[R "5S35n[RR U5(dgSn[U5nUH:nSUR5;dMUR5R5SnM< SSS5 U$!,(df  U$=f![a gf=f)N.errtemporary passwordr) rrrprsocket gethostnamer@rJrNrKrLr.)log_pathtemp_pwrRrSs rfetch_temp_root_passwordr sww||G(:(:(<'=T%BCH 77>>( # #G (^q'4::<7"jjl00226G N ^ N s6# C .B9 %B9/C 9 CC C CCc[SUS35 [XSS9(d [S5 g[SS5GHn[5(a g[ 5nUR S S 5nUR S 5nUc[S US [ S35 [R"/SQ[R[RS9nURS:Xa [S5 [S S5(a gGO-[SUS35 GO[5nU(a[SUS35 [RR5nXxS'SR!UR#SS55n [R"SSSSU /USS 9 [5(a [S!R![ 55 gS"n [R$R'U 5(aI[SUS#35 [X/SS$9 [5(a [S!R![ 55 g[(R*"U5 GM [S%R![ 55 g)&zGEnsure mysql root password matches credentials stored in /root/.my.cnf.z[*] Waiting up to zEs for database service to accept connections before root auth sync...Frsz6[!] Database service did not become reachable in time.r>Trrootrz [i] Attempt rzC missing or lacks password; probing for passwordless root access...)r-urootr rrrzQ[+] Passwordless root login succeeded; writing /root/.my.cnf with empty password.rAz [!] Attempt z!: passwordless root login failed.z [*] Attempt z=: synchronizing MySQL root password using temporary password. MYSQL_PWDz0ALTER USER 'root'@'localhost' IDENTIFIED BY '{}''z\'rr--connect-expired-passwordr )envruz&[+] Root password synchronized with {}z*/usr/local/cpanel/scripts/setmysqlrootpassz3: setting MySQL root password via setmysqlrootpass.rzd[!] Unable to synchronize MySQL root password automatically. Please ensure {} credentials are valid.)rr{rangerr rMrrqrrrrsr rrenvironcopyr'r|rr@rr) max_waitruattemptr  desired_user desired_passr temp_passwordr sqlsetpasss r"ensure_root_password_matches_mycnfr+/sD XJ&kl %  DEA;   ')yy0 yy,    wir*5xy >>6!))!))D !#g$FB//0l7)+LMN46M"7)+hijjoo'#0K HOO ((e4 4  %&&@GG&  BGww~~g&&"7)+^_W+59$&&@GG&   8MPnuu   rc4[/SQSS9 [/SQSS9 g)NrFrrrrenablez mysql:8.0rr"rrenable_mysql_module_80r/s1?6eDrc X [S5 [5 [S5 [S[S[S35nU(a [ U5 [S5 [ /SQ5 [S[S[S3SS 9nU(a [U5 [S 5 [/S QS S 9 [ S/5 [S5 [/SQS S 9 [/SQS S 9 [ SS/5 Sn[SS5nURU5 SSS5 [/SQS S 9 [/S QS S 9 [SS/S S 9 [S5 /SQn[U5(a [S5e[SS/U-SS 9 [RRS5(a[S5 [R "S SS!9 S"Hrn[RRS#U35(dM,[RRS$U35(aMU[R""S#U3S$U35 Mt [S%S5nURS&5 SSS5 O[S-5 [S.S//SS 9 [/S0QSS 9 [,R."S15 [15(d[S25 [/S3QS S 9 [/S4QS S 9 [RR3[4[6R8"5S535n[RRU5(a[S6US735 [S8S9S:U/S S 9 O[S;US<35 [S=5 [/S>QS S 9 [/S?QS S 9 [15(d [%S@5eSn[RR3[4[6R8"5S535n[RRU5(aT[U5nUH:n SAU R;5;dMU R=5R?5SBn O SSS5 [SC5 U(a/[SDU35 /SEQn U Hn[SFSGSHU3SISJU/S S 9 M O [SK5 [RRS5(al[SM5 /SNQn U H5n [RRU 5(dM)[U /S S 9 M7 [SQ5 [SR5 [SSST/S S 9 [SU5 [SV5 U(a [SW5 O [SX5 [SY5 [SZ5 [S[5 [S\5 [S]5 g!,(df  GN=f!,(df  GNR=f![$an[S'['U535 [S(5 [/SQS S 9 [/S)QS S 9 /S*Qn[U5(a![S+5 [(R*"S,5 [SS/U-SS 9 SnAGNSnAff=f!,(df  GN=f![$a"n[SL['U535 SnAGNSnAff=f![$a&n[SOU SP['U535 SnAGMSnAff=f)^Nz=[*] Ensuring clean system state for MySQL 8.0 installation...z/[*] Removing existing MySQL/MariaDB packages...rrrfz+[*] Cleaning up remaining database files...)rrrTrz%[*] Cleaning package manager cache...rFrz/var/cache/dnfz'[*] Configuring MySQL 8.0 repository...rrz/etc/yum.repos.d/mariadb*.reporz[mysql80-community] name=MySQL 8.0 Community Server baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/8/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql z%/etc/yum.repos.d/mysql-community.repor:)r--importz(https://repo.mysql.com/RPM-GPG-KEY-mysqlr makecachez"[*] Installing MySQL 8.0 server...)installzmysql-community-server--allowerasingz5dnf install would remove protected cPanel/EA packagesr/usr/local/cpanel+[*] Configuring for cPanel compatibility.../usr/local/mysql/binrrrr1 /usr/bin//usr/local/mysql/bin//var/cpanel/mysql/versionrz![!] Failed to install MySQL 8.0: z1[*] Attempting alternative installation method...r-)r3z @mysql:8.0r4zA[!] Refusing alternative MySQL install due to protected removals.r>z![*] Starting MySQL 8.0 service...r daemon-reload)rr.--nowrrrz5[!] MySQL service failed to start. Checking status...)rrCr) journalctl-xe-urr [!] Error Log ( - last 20 lines):tail-n20z[!] Expected error log z not found.z& [!] Trying to start MySQL manually...)rz--initialize-insecurez --user=mysql)rrrz5Failed to start MySQL service after multiple attemptsrrz"[*] Securing MySQL installation...z) [!] IMPORTANT: Temporary root password: )z/ALTER USER 'root'@'localhost' IDENTIFIED BY '';%DELETE FROM mysql.user WHERE User='';[DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');DROP DATABASE IF EXISTS test;5DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';FLUSH PRIVILEGES;rz --user=rootz --password=rr z?[*] No temporary password found, assuming existing installationz,[!] Warning: Could not secure installation: z$[*] Updating cPanel configuration...z//usr/local/cpanel/bin/update_local_rpm_versionsz-/usr/local/cpanel/bin/check-db-stable-versionz5/usr/local/cpanel/scripts/check_cpanel_mysql_routines[!] Warning: Failed to run rB[*] Running cPanel update (upcp) to restore users and databases...0 This may take several minutes to complete...rrz3 [+] MySQL 8.0 installation completed successfully! [!] IMPORTANT NEXT STEPS:zO 1. Set a root password using: mysqladmin -u root -p password 'new-password'zM 1. If you need to reset the root password, use: mysql_secure_installationz4 2. Verify all databases and users are accessiblez5 3. Check application compatibility with MySQL 8.08 [!] If you encounter any issues, check these log files: - /var/lib/mysql/*.*.err$ - journalctl -xe | grep -i mysql) rrrrrr rrrrrJrhr RuntimeErrorrrr@rsymlinkr.rnrfrgrrrrprrrrNrKrL) existing_pkgs conflicting mysql_reporR install_argsrtr6 hostname_logr(rScmdscpanel_scriptsscripts rinstall_mysql80r]s GH I9:* % &a(A'B!DM'56 ( % &a(A'B!DK{#/0u-$%&121?35A , * J 5s ;q   <G u- E*,-(6 +< 8 8G  DML ( 77>>- . . = > KK. >;77>>IcU"344RWW^^+C51>>JJ3%04I#2OP <137187 /4+,o&d32$? JJqM << CD -U; 1?ww||G0B0B0D/ET-JK 77>>, ' ' #L>1CD E t\2% @ ),{C D 56 ?uM ,E:||G  M77<<F,>,>,@+A)FGL ww~~l## , 1'4::<7$(JJL$6$6$8$? -y 9G>?%& ]  [ >??@CD&'./W < ;T87  6 /Ax 89 ?@ 5UC :%HB *< 8 8 S T HHQK UDML (55 6^ N E :3q6( CDDE !J5fXRAxHIIJs1U>;BV"%V"-V"1VV"+X8%X85Y 6 Y ! Y9> V  VV"V"" X5,A>X00X58 Y Y6Y11Y69 Z)Z$$Z)c N W"S5 U"S5 [5 U"S5 Sn[SS5nURU5 SSS5 [/SQSS 9 U"S 5 [/S QS S 9 [/S QSS 9 [SS/SS 9 U"S5 [/SQS S 9 [R R S5(aU"S5 SHn[R R SU35(dM,[R R SU35(aMU[R"SS S9 [R"SU3SU35 M [SS5nURS5 SSS5 O[R R S5(a9U"S5 [/SQSS 9 [/SQSS 9 [/S QSS 9 [/S!QSS 9 U"S#5 [S$S%/S S 9 [/S&QS S 9 [5(dU"S'5 [/S(QSS 9 [/S)QSS 9 S*S+[R"5RS,3S-/nUHCn[R R U5(dM)U"S.US/35 [S0S1S2U/SS 9 ME U"S35 [/S4QSS 9 [5(dU"S55 [/S6Q5 [5(dU"S75 U"S85 U"S95 gU"S:5 /S;QnUHn[SU35 U"S?[U535 SnAGMSnAff=f![a#nU"SBUSC[U535 SnAGMSnAff=f![anU"SJ[U535 SnAGNISnAff=f)SNz[*] Installing MariaDB 10.6...z@[*] Ensuring clean system state for MariaDB 10.6 installation...z)[*] Setting up MariaDB 10.6 repository...z[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.6/rhel8-amd64 module_hotfixes=1 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 z/etc/yum.repos.d/mariadb.repor:)rr1z+https://yum.mariadb.org/RPM-GPG-KEY-MariaDBFrz'[*] Installing required dependencies...)rrr3socatlibnslzperl-DBD-MySQLzpolicycoreutils-python-utilsTrrr2z%[*] Installing MariaDB 10.6 server...)rrr3zMariaDB-serverzMariaDB-clientzMariaDB-sharedzMariaDB-commonzMariaDB-compatr5r6r8r9r:r7rr;rz)[!] Warning during MariaDB installation: z/usr/sbin/sestatusz&[*] Configuring SELinux for MariaDB...)semanageportr-t mysqld_port_t-ptcp3306)rarbz-mrcrdrerfrg)rafcontextrrc mysqld_db_tz/var/lib/mysql(/.*)?) restoreconz-Rr z*[!] Warning: Could not configure SELinux: z[*] Starting MariaDB service...rr<)rr.r=rz7[!] MariaDB service failed to start. Checking status...)rrCr)r>r?r@rz/var/lig/mysql/*.*.errz/var/lib/mysql/rz/var/lib/mysql/*.*.errrArBrCrDrEz, [!] Trying to start MariaDB with systemd...)rrrz, [!] Attempting to start MariaDB directly...)z/usr/libexec/mysqldz--skip-grant-tablesz--skip-networkingzG [!] ERROR: Could not start MariaDB. Please check the error logs above.zK You may need to manually configure MariaDB or check for port conflicts.z/ Try running: journalctl -xe | grep -i mysqlz$[*] Securing MariaDB installation...)z3SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');rFrGrHrIrJrr z [!] Warning: Failed to execute: z Error: z*[*] Updating cPanel MySQL configuration...rKrLrz![*] Restarting cPanel services...z+/usr/local/cpanel/scripts/restartsrv_cpsrvdrMrNrrz4[!] Warning: Could not complete all security steps: z6 [+] MariaDB 10.6 installation completed successfully!rOzQ 1. Set a root password using: mysqladmin -u root password 'your-new-password'zL 2. If using cPanel, run: /usr/local/cpanel/bin/update_local_rpm_versionsz( 3. Check MySQL users and permissionsrPrQrR)rrJrhrrrrr@rrTr.rnrunamenodenamer) r maria_reporRrtr6 error_logsrZr[r\s rinstall_mariadb106ro|s+()JK34J -s 3q   4J 12  u- E*/0 B    77>>- . . = >;77>>IcU"344RWW^^+C51>>KK 6FJJ3%04I#2OP <137187 /$ ww~~*++ 45, G         6e D )*o&d334@ << EF .e< 2%@ %bhhj112$ 7 $ Cww~~c""'u,>?@VT4-U; ;< -U;|| ? @   << V  Y  =>./0M C -WdC(6 77>>- . . < =N )77>>&))NVHE2) 77>>- . . 3 4 >?u M T  B C 19=U K AB%&[V23CD&'./ 4 3t87 B 7Ax @AABb G >& ! ! MN G  AB B &,)D6(:;5 I 7 6tf= >B  Ircb[S5 [/SQSS9 [/SQSS9 [/SQSS9 g)z;Restart MySQL/MariaDB service to pick up restored settings.z"[*] Restarting database service...)rrestartrFr)rr|r)rr|rNrr"rrrestart_mysql_servicer}s,,-*%8)7+59rc z[(a [S5 g[S5nU(d [S5 g[SSSS9(d [S 5 g[ US [ -S S /5nUR 5Vs/sH)o"R5(dMUR5PM+ nn1S knUVs/sH o"U;dM UPM nn[S[U5S35 U(dgUSn[ US [ -S SUS3/5nUR 5Vs/sH)oR5(dMUR5PM+ n nU (d[SUS35 gU Sn [US [ -SSUSU S3/SS9n U S:wa[SUSU 35 g[SUSU 35 gs snfs snfs snf)z0Basic service + data sanity check after restore.z-[dry-run] Skipping post-restore health check.Trz?[!] mysql client not found; skipping post-restore health check.Frrrsz8[!] MySQL/MariaDB did not become ready for health check.rr2r3>rfrr4r5z[*] Health check: found z user databases.rzSHOW TABLES IN ``z[i] Health check: sample DB z has no tables to check.r z CHECK TABLE `z`.`rz[!] Health check failed on rDz[+] Health check passed on ) rlrrr{rrrrKrrr) rdbs_rawrrFrGrD sample_db tables_rawttables sample_tablers rpost_restore_health_checkrsw ;<gI  MN ad K FG &3V=MNG&002 @2ggi917792C @MJ63a:"53H6 "3x=/1ABC  I   + yk +  J",!6!6!8 F!8AGGIiaggi!8F F  *9+5M N !9L   + I;c,q 9   B Qw ))Al^ DE %i[,@A M A6Gs$:F.F.4 F3F3F86F8cN[S5nU(dg[5(a*[SSSUS/5n[R"SU5nO[R"SUS5nU(aUR S5$g![ an[S U35 SnAgSnAff=f) Nz^mariadb-serverrrz -f=${Version}rz (\d+\.\d+)zmariadb[^\d]*(\d+\.\d+)r>z1[!] Could not determine current MariaDB version: )rrbrrrrr.r)rrrr6s rget_current_mariadb_versionrs E#$67 ;;|T?GAJGHCIImS1EII8'!*EE ;;q> !   E ?s CDD EsBA*B B$ BB$c  [RSSn/nSnUHnUS;a?[U5 [[RS5 [R"S5 MHUS:XaSqMRUS:XaSqM\URS5(aURSS5SnMURU5 M [U5 [S [35 U(d2[[RS5 [R"S5 [5 USnU[;aR[S RUS R[R!5555 [R"S5 [UupV[#5nSnUS :Xa [%5nOUS :Xa ['5nXu:Xa;X:Xa6[SUR)5SUS35 [R"S5 [SUSUS35 [S[+535 [S5 [-5(d![S5 [R"S5 [/[05upU S:Xa0[SRU 55 [R"S5 U S:XaX[S5 [35R55R75n U S;a![S5 [R"S5 [S5 [95 [S5 Sn US :Xa[S 5 [;5 Sn O)US :Xa[S!5 [=5 Sn O [S"5 [S#5 U (a [S$5 O [?5 [S%5 [A5 [CU5 [E5n U (a)[S&RS RU 555 [S'5 [GU5nU(d[I5(a [S(5 OxUS :Xa-US):Xa'[S*RU55 [K5 SnOEUS :Xa-US+:Xa'[S,RU55 [M5 SnO[S-USUS.35 U(dI[S/RU55 [S0U 35 [S15 [R"S5 [O5 [Q5(d![S25 [R"S5 US :H=(a US :HnU(a [S35 [SXS49(d![S55 [R"S5 [U5 [W5 [Y5(d [S65 [[5 [O5 []5nU(d [S75 O [S85 [S95 [S:U 35 g);Nr>)z-hz--helprz --dry-runTrz --log-file=r=z[*] Logging to: z&[!] Invalid target: {} Allowed: {}r7rrz[*] rz) is already installed. No changes needed.zTarget: rerfzWhen: z' [1/5] Backing up all user databases...z3[!] Aborting due to insufficient space for backups.r0zF[!] Backup failed; aborting to prevent data loss. Backup directory: {}r6zE[?] No user databases were found to back up. Continue anyway? [y/N]: rz4[!] Aborting at user request due to missing backups.z$ [2/5] Stopping database services...z1 [3/5] Removing existing installation (if any)...Fz-[*] Removing existing MariaDB installation...z+[*] Removing existing MySQL installation...z0[*] No existing MySQL/MariaDB packages detected.z [4/5] Cleaning up...z>[*] Package cleanup already completed during database removal.z.[*] Ensuring Perl MySQL modules are present...z[i] WHM (probe) allows: {}z4 [5/5] Installing requested engine via cPanel API...z_[!] Manual package fallback is not implemented for Ubuntu; cPanel API installation is required.rzE [!] API install failed; falling back to manual MariaDB {} install...rzC [!] API install failed; falling back to manual MySQL {} install...z'[!] No manual fallback implemented for rDz7 [!] Installation did not complete successfully for {}.z - Backup was saved to: zI - Track WHM status with: whmapi1 get_mysql_upgrade --output=json|yamlzg[!] Unable to authenticate with MySQL using /root/.my.cnf credentials. Aborting to prevent data issues.zP[*] MySQL-to-MariaDB migration detected; enabling collation compatibility fixes.)rzG[!] One or more database restores failed; check logs before proceeding.zD[!] One or more grant restoration steps failed. Review output above.zN[!] Post-restore health check reported issues. Review logs and database state.z%[+] Post-restore health check passed.zB[+] Requested database engine installed and data restore complete.z$ - Backup directory retained at: )/rfargvr7rrgrlrrrLr,rrriTARGETSr'rpkeysrrrtitler#r-rKrrrKrNrrrrrrrrrbror]rr+rrr}rzrr)r; positionalrarg target_keytfamilytvercurrent_family current_verr~ backup_statusrremoved_existingr install_okfix_collations health_oks rmainrs 88AB? ! LM89T"mG ( / / '0B CD?@(.J  ;; q  !dfn X__   J  DEM V]]   J 9'!D6K L  F M M  )* 67 W   ') . / / u   $w.G7i3GN ^_   U     " $ $ R '))+I  \  34LM .zl;rsRQQQQQ(%%  ,      "   /.'% ""4!3< # H> *ZA+24&5   + ,4 <K7@  "& 5B8 9* 9 9 >>==! !D  4$2"8nb $NPf7 C G'TD/N  2Dj,,4" " (KV 6H .    ZzE h0Vo0d$&:6r$@=F zFr