How to fix this issue in Django [Mysql SQL server connection error] while logging into admin

Lakshay Kumar 0 Reputation points
2024-05-14T05:04:57.25+00:00

Screenshot 2024-05-14 at 10.13.52 AM

OperationalError at /admin/login/

(3159, 'Connections using insecure transport are prohibited while --require_secure_transport=ON.')

POSTRequest Method:POSTRequest URL:http://seno.azurewebsites.net/admin/login/?next=/admin/Django Version:5.0.4Exception Type:OperationalErrorException Value:(3159, 'Connections using insecure transport are prohibited while --require_secure_transport=ON.')Exception Location:/tmp/8dc6fe6d56c0880/antenv/lib/python3.11/site-packages/MySQLdb/connections.py, line 195, in __init__Raised during:django.contrib.admin.sites.loginPython Executable:/opt/python/3.11.8/bin/python3.11Python Version:3.11.8Python Path:['/tmp/8dc6fe6d56c0880', '/opt/python/3.11.8/bin', '/opt/startup/app_logs', '/tmp/8dc6fe6d56c0880/antenv/lib/python3.11/site-packages', '/opt/python/3.11.8/lib/python311.zip', '/opt/python/3.11.8/lib/python3.11', '/opt/python/3.11.8/lib/python3.11/lib-dynload', '/opt/python/3.11.8/lib/python3.11/site-packages', '/opt/python/3.11.8/lib/python3.11/site-packages/viztracer/attach_process']Server time:Tue, 14 May 2024 04:43:31 +0000

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,114 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 19,281 Reputation points
    2024-05-15T10:08:44.7266667+00:00

    @Lakshay Kumar Thanks for asking question! If you try to connect to your server with unencrypted connections, you'll see error stating connections using insecure transport are prohibited similar to one below:

    ERROR 3159 (HY000): Connections using insecure transport are prohibited while --require_secure_transport=ON.
    
    
    

    Suggest you to refer this document to Connect to Azure Database for MySQL - Flexible Server with encrypted connections

    Let us know if further query or issue remains.

    0 comments No comments