I am using mysql8. I do uninstall mysql8 to install mariadb. However, I tried many times but still failed.
This is probably a bug on AAPANEL because I have tried it on many VPS and after uninstalling it cannot be reinstalled.

    Log

    byte-compiling build/bdist.linux-x86_64/egg/pymysql/converters.py to converters.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/pymysql/_socketio.py to _socketio.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/pymysql/optionfile.py to optionfile.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/pymysql/cursors.py to cursors.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/pymysql/protocol.py to protocol.cpython-37.pyc
    byte-compiling build/bdist.linux-x86_64/egg/pymysql/__init__.py to __init__.cpython-37.pyc
    creating build/bdist.linux-x86_64/egg/EGG-INFO
    copying PyMySQL.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying PyMySQL.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying PyMySQL.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying PyMySQL.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying PyMySQL.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    /www/server/panel/pyenv/lib/python3.7/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
      warnings.warn(msg, warning_class)
    /www/server/panel/pyenv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    /www/server/panel/pyenv/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      EasyInstallDeprecationWarning,
    zip_safe flag not set; analyzing archive contents...
    creating dist
    creating 'dist/PyMySQL-0.9.3-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
    removing 'build/bdist.linux-x86_64/egg' (and everything under it)
    Processing PyMySQL-0.9.3-py3.7.egg
    Copying PyMySQL-0.9.3-py3.7.egg to /www/server/panel/pyenv/lib/python3.7/site-packages
    Adding PyMySQL 0.9.3 to easy-install.pth file
    
    Installed /www/server/panel/pyenv/lib/python3.7/site-packages/PyMySQL-0.9.3-py3.7.egg
    Processing dependencies for PyMySQL==0.9.3
    Finished processing dependencies for PyMySQL==0.9.3
    Reload Bt-Panel..	done
    Stopping mysqld (via systemctl): mysqld.service.
    Changing password...
    mysql_root.sh: line 6: mysqld_safe: command not found
    mysql_root.sh: line 14: mysql: command not found
    mysql_root.sh: line 23: mysql: command not found
    Starting mysqld (via systemctl): mysqld.service.
    ===========================================
    The root password set d7469eca76964285  successuful
    1
    Stopping mysqld (via systemctl): mysqld.service.
    Changing password...
    mysql_root.sh: line 6: mysqld_safe: command not found
    mysql_root.sh: line 14: mysql: command not found
    mysql_root.sh: line 23: mysql: command not found
    Starting mysqld (via systemctl): mysqld.service.
    ===========================================
    The root password set d7469eca76964285  successuful
    1
    --2023-12-20 02:24:55--  https://dg2.bt.cn/tools/check.sh
    Resolving dg2.bt.cn (dg2.bt.cn)... 103.179.243.14, 2001:19f0:7001:54fc:5400:2ff:fe9b:97f9
    Connecting to dg2.bt.cn (dg2.bt.cn)|103.179.243.14|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 565 [application/octet-stream]
    Saving to: ‘/www/server/panel/install/check.sh’
    
         0K                                                       100%  296M=0s
    
    2023-12-20 02:24:55 (296 MB/s) - ‘/www/server/panel/install/check.sh’ saved [565/565]
    
    |-Successify --- Command executed! ---

    aaPanel_Kern

    I have been using AAPANEL since the first days of its launch and mariadb is working very well with my website system, and my applications require > mariadb 10.5. Please help me handle the problem.

    3 months later

    Kenos

    I discovered that if I previously installed mysql8, I cannot reinstall mariadb. But I can only install mysql 5.x

      dotrungquan Maybe think solution: there install mysql and later change version mysql_mariadb done solution think.

      3 months later

      Update: 02/06/2024

      this is how i reinstalled mariadb 10.x. If you are getting errors while installing, try the same commands as me

      mv /www/server/data /www/server/data.bak
      mv /www/server/mysql /www/server/mysql.bak
      mv /etc/my.cnf /etc/my.cnf.bak
      mv /run/systemd/generator.late/multi-user.target.wants/mysqld.service /run/systemd/generator.late/multi-user.target.wants/mysqld.service.bak
      
      ps auxf | grep mysqld
      pkill -9 mysqld
      
      mv /www/server/panel/install/mysql.sh /www/server/panel/install/mysql.sh.bak
      cd /www/server/panel/install/
      wget https://node.aapanel.com/install/1/mysql.sh --no-check-certificate
      bash mysql.sh install mariadb_10.11

      Connect with us: 📨 Telegram 💬 Discord Email: support@aapanel.com