Page 1 of 1

Installation Test: Cannot connect to database

Posted: 19 May 2017, 03:21
by Loren
Hello everyone,
I have been installing OpenCATS onto a RHEL server with everything loading into Linux just fine. But when I start the actual OpenCats installation, when I get to the CATS installation test, I get:

Cannot connect to database
Access denied for user 'cats'@'localhost' (using password: YES)

Using phpMyAdmin I checked and the cats user is created. One curiosity: In the OpenCATS documentation the instructions to create the user from the command line gave me a syntax error. Also, the documentation says to create user: 'opencats' but the installation test seems to be checking for user: 'cats.' The instructions also indicate 'databasepassword' which I used when I created the user and password in phpMyAdmin. I have tried every combination of user 'opencats' and user 'cats' along with the 'databasepassword' no password, and anything else I could think of.

I am pretty stuck here. Thank you in advance for your help and guidance.

Re: Installation Test: Cannot connect to database

Posted: 25 May 2017, 14:51
by gregg
I think I found it.

I am having hte same issue attempting to get 9.4 installed and running.

In the Config.php there is a section that looks like this:
/* Database configuration. */
define('DATABASE_USER', 'cats');
define('DATABASE_PASS', 'password');
define('DATABASE_HOST', 'localhost');
define('DATABASE_NAME', 'cats_dev');


Note that the username, password and db name are set to values completely different than the instructions. I believe you just need to change these to the values that we were given:

/* Database configuration. */
define('DATABASE_USER', 'opencats');
define('DATABASE_PASS', 'opencats');
define('DATABASE_HOST', 'localhost');
define('DATABASE_NAME', 'opencats');

I am going to test it next - I have to re-upgrade as I backed out when I could not get past the same issue.

Hope this helps.

Re: Installation Test: Cannot connect to database

Posted: 25 May 2017, 14:54
by RussH
Hi Gregg.

when you manually create a database and user in MySQL, you need to specify that in the installation wizard. Please report back if you have further problems!

Re: Installation Test: Cannot connect to database

Posted: 07 Jul 2019, 00:04
by C2C1
:cry: 8hrs and still trying to figure this issue out and what I did wrong.

Re: Installation Test: Cannot connect to database

Posted: 16 Feb 2021, 00:15
by Daniel
Use these queries

CREATE USER 'opencats'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE opencats;
GRANT ALL PRIVILEGES ON opencats.* TO 'opencats'@'localhost' IDENTIFIED BY 'password';
exit;

Re: Installation Test: Cannot connect to database

Posted: 18 Jul 2021, 19:00
by DRHarrison
gregg wrote: 25 May 2017, 14:51 I think I found it.

I am having hte same issue attempting to get 9.4 installed and running.

In the Config.php there is a section that looks like this:
/* Database configuration. */
define('DATABASE_USER', 'cats');
define('DATABASE_PASS', 'password');
define('DATABASE_HOST', 'localhost');
define('DATABASE_NAME', 'cats_dev');


Note that the username, password and db name are set to values completely different than the instructions. I believe you just need to change these to the values that we were given:

/* Database configuration. */
define('DATABASE_USER', 'opencats');
define('DATABASE_PASS', 'opencats');
define('DATABASE_HOST', 'localhost');
define('DATABASE_NAME', 'opencats');

I am going to test it next - I have to re-upgrade as I backed out when I could not get past the same issue.

Hope this helps.
Thanks gregg!!
I'm trying to install 9.6, and kept running into the user/password issue. I figured out that it was cats and password, but then it couldn't find the database. In the config.php, it was cats_dev not opencats. I changed the database to opencats, and I got further, with some warnings. I may go back and leave cats_dev and see if that resolves the php warnings.