Flask-Appbuilder can not connect phpmyadmin

101 views Asked by At

I already installed python ldap in my web server

(venv) vocstartsoft:~/environment/myproject $ pip install python-ldap
Requirement already satisfied: python-ldap in ./venv/lib/python3.6/dist-packages (3.3.1)
Requirement already satisfied: pyasn1-modules>=0.1.5 in ./venv/lib/python3.6/dist-packages (from python-ldap) (0.2.8)
Requirement already satisfied: pyasn1>=0.3.7 in ./venv/lib/python3.6/dist-packages (from python-ldap) (0.4.8)

I add code to config.py

import ldap
AUTH_TYPE = 2
AUTH_LDAP_SERVER="ldap://my public address:389"
AUTH_LDAP_USE_TLS=False
AUTH_LDAP_SEARCH = "dc=example,dc=com"
AUTH_LDAP_BIND_USER = "cn=admin,dc=example,dc=com"
AUTH_LDAP_BIND_PASSWORD = "123"
AUTH_LDAP_APPEND_DOMAIN ="example.com"

I use phpmyadmin for openldap:

  • Login DN:cn=admin,dc=example,dc=com
  • password:123

Than I login my webpage: Invalid login. Please try again.

  • user:admin
  • password:123
0

There are 0 answers