Centos 7 mariadb errors

I've seen others who has gotten the same error that I'm seeing now, which is: 

Access denied for user ‘pmh3’@‘localhost’ (using password: YES).

Confirm that the information in your db.ini file is correct.

Here is the db.ini file (with PW entry removed): – I changed it from username from omeka_user to the actual user – you can see the commented-out line in the above copy of our db.ini file:

host = “localhost”
; username = "omeka_user"
username = "pmh3"
password = "abcdefg"
dbname = "omeka_db"
prefix = "omeka_"
charset = “utf8”
;port = “”

What is the proper permission for the /var/www/html/omeka directory and it’s contents? Should it be user apache? Here is what mine looks like:

[root@vm053 omeka]# ls -al
total 76
drwxr-xr-x 8 apache ha560hp 4096 May 15 11:23 .
drwxr-xr-x. 4 root root 29 Apr 12 17:04 …
drwxr-xr-x 3 apache ha560hp 35 Jan 30 17:13 admin
drwxr-xr-x 13 apache ha560hp 4096 Jan 30 17:13 application
-rw-r–r-- 1 apache ha560hp 5817 Jan 30 17:13 bootstrap.php
-rw------- 1 apache ha560hp 560 May 15 11:11 db.ini
drwxr-xr-x 7 apache ha560hp 97 Jan 30 17:13 files
-rw-r–r-- 1 apache ha560hp 1700 Apr 20 17:09 .htaccess
-rw-r–r-- 1 apache ha560hp 588 Jan 30 17:13 index.php
drwxr-xr-x 6 apache ha560hp 4096 Jan 30 17:13 install
-rw-r–r-- 1 apache ha560hp 35147 Jan 30 17:13 license.txt
drwxr-xr-x 5 apache ha560hp 57 Jan 30 17:13 plugins
-rw-r–r-- 1 apache ha560hp 1225 Jan 30 17:13 README.md
-rw-r–r-- 1 apache ha560hp 32 Jan 30 17:13 robots.txt
drwxr-xr-x 5 apache ha560hp 47 Jan 30 17:13 themes

From the error log:

[Mon May 15 13:11:24.641552 2017] [:error] [pid 25203] [client 128.182.168.129:37340] Omeka fatal error: Access denied for user ‘pmh3’@‘localhost’ (using password: YES).nnConfirm that the information in your db.ini file is correct.

Any help is appreciated. The user wants this tomorrow! TIA ~

Susan Litzinger
PSC
412-268-8263

This is not related to the permission of the files. Check if you have access to the base with the params in db.ini with the terminal or via phpmyadmin or adminer.

One thing to keep in mind is that MySQL/Maria permissions grants can vary based on the host, so make sure your user is set up to log in from “localhost,” and that they actually have permissions on the database you’re listing in dbname. Of course, make sure the username and password and other details are right too. If you can log in with a set of credentials using the mysql command line client on the server, the same ones should work in db.ini.

I am having this same issue now. I cannot log in as the user from the mysql command line. If I try to use mysql -u someperson -p I cannot log in. But if I just use mysql -u someperson without the password the user gets in. What am I missing?

Omeka isn’t going to do anything really interesting or different with your database credentials vs. the command line mysql client. If you can’t log in with your credentials through the client, then the credentials are wrong.

If you’re logging in without the password with the client, maybe that database user was created without a password, or their password was removed? I wouldn’t recommend that.