Search code examples
pythonmysqldjangodatabasemariadb

how to solve django.db.utils.NotSupportedError in django


I got an error while running the project in Django. the thing is that unfortunately i upgraded my pip , MySQL client and Django versions

this is the error while running python manage.py run server

in check_database_version_supported
raise NotSupportedError(
django.db.utils.NotSupportedError: MariaDB 10.3 or later is required (found 10.1.19).

Solution

  • You have a MariaDB-10.1.19 client installed to MySQL server, and your application found that 10.1.19. As in the error you need to have MariaDB 10.3 or later. You can upgrade MariaDB as

    • First stop the xampp server completely.
    • Then go to MariaDB download page and download the zip file of latest stable version
    • extract the file, and rename the folder from mariadb-10.x.x to mysql
    • Then in your C: drive go to xampp directory and change the mysql folder name to mysql_old
    • Then copy the extracted folder to xampp directory.
    • Then go to mysql_old directory and copy backups folder, scripts folder, mysqlinstallservice file, mysqluninstallservice file and paste to mysql folder.
    • Then go to bin folder in mysql_old and copy my file to bin folder in mysql folder.
    • Then edit my file in mysql and add skip-grant-tables in line before #skip-federated, also delete this line innodb_additional_mem_pool_size = 2M, then save the file.
    • Then in bin folder open mysql_upgrade and run it.
    • After ran succesfully, rename data folder as data_new in mysql folder, then copy data folder from mysql_old folder to mysql folder.
    • Now run xampp control panel and start apache server and mysql.

    Now MariaDB is updated and issue will be solved.