mod_authn_dbd cannot connect to mysql

os: centos 7
apache 2.4.6
mysql 5.6.41

my configuration is in /etc/httpd/sites-enabled/

<VirtualHost *:80>

DBDriver mysql
#DBDParams host=localhost,dbname=myDB,user=root,password=*****
DBDParams "dbname=myDB user=root password=*****"
#DBDParams host=localhost,dbname=myDB,user=root,password=*****,sock=/var/lib/mysql/mysql.sock

#DBDParams "host= port=3306 dbname=myDB user=root password=***** sock=/var/lib/mysql/mysql.sock"

DBDMin  4
DBDKeep 8
DBDMax  20
DBDExptime 300

<Directory "/path/to/Dir">

AuthDBDUserPWQuery "SELECT user_passwd FROM myTable WHERE user_name = %s"
#AuthDBDUserPWQuery "SELECT encrypt(user_passwd) AS password FROM myTable WHERE user_name = %s"
  AuthType Basic
  AuthName "site"
 Require valid-user
     AuthBasicProvider socache dbd
 #   </RequireAll>

    DocumentRoot /Path/to/Dir
    ErrorLog /myPath/error.log
    CustomLog /myPath/requests.log combined


Open in new window

After entering the username and password I get an "Internal Server Error" message.
My error log..

[Mon Sep 10 09:42:55.454763 2018] [dbd:error] [pid 32515] (20014)Internal error: AH00629: Can't connect to mysql: Access denied for user 'root'@'localhost' (using password: NO)
[Mon Sep 10 09:42:55.454833 2018] [dbd:error] [pid 32515] (20014)Internal error: AH00633: failed to initialise
[Mon Sep 10 09:42:55.454854 2018] [authn_dbd:error] [pid 32515] [client] AH01653: Failed to acquire database connection to look up user 'mark'

Any ideas?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

theGhost_k8Database ConsultantCommented:
"(using password: NO)" Are you providing password? I think it is "pass=" and not "password="

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mark2326Author Commented:
Yes I am providing a password.
changing to ..
DBDParams "dbname=myDB user=root pass=*****"

Open in new window

The dialog keeps popping up saying "Incorrect user name or password"

[Mon Sep 10 09:59:29.746818 2018] [auth_basic:error] [pid 9923] [client] AH01617: user mark: authentication failure for "/myFile.pdf": Password Mismatch

The DBDParams are per apache's example.
theGhost_k8Database ConsultantCommented:
Can you confirm the connectivity works..
mysql -uUSER -pPASS
mark2326Author Commented:
yes using..
 mysql -u root p- *****

mark2326Author Commented:
It turns out you were correct, it is pass= and not password=
After thinking about it, I wasn't getting connection errors anymore.
I changed...
AuthDBDUserPWQuery "SELECT user_passwd FROM myTable WHERE user_name = %s"

Open in new window

AuthDBDUserPWQuery "SELECT encrypt(user_passwd) AS password FROM myTable WHERE user_name = %s"

Open in new window

Seems to be working
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.