Cannot successfully log into CA yet - but believe I am close!

edited January 26 in General Support
  • Using 1.7.9 in the Mac Terminal
  • I have not been able to successfully log into the system yet.
  • Currently, I see the following when I try to log in:

Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/var/www/ca/app/lib/Db/mysqli.php line 139:

  1. In Db_mysqli->connect(Object Db, Array(5)) in Db line 134
  2. At Db->connect(Array(5)) in Db line 108
  3. At Db->__construct(, , false) in index line 42

I have gone into the file and looked at the lines, but cannot see what is wrong. Also, when I search for "Array(5)", nothing returns.

I have also tried to edit the login setting only to receive the same access denied errors within the terminal:

2021-01-25 23:23:54 - ERROR --> DatabaseException: Access denied for user 'my_database_user'@'localhost' (using password: YES)

2021-01-25 23:25:59 - ERROR --> DatabaseException: Access denied for user 'Rachael'@'localhost' to database 'myarchive'

Does anyone know what I am doing wrong?


  • How are you searching if you can't log in?

    The error you are getting indicates the login information for MySQL you have in your setup.php is incorrect. You seem to have two different logins set up – the "my_database_user" one is the placeholder value in the setup.php template. The other one is presumably you... so I guess you're running Providence and Pawtucket? Check the database info for both. That's where the problem is.


  • edited January 26

    Am I entering this incorrectly? I followed the format from the 'localhost' section, and used "root" as the username with a blank password as recommended by the MAC OS installation instructions. (Thank you so much for your response!)

  • You should remove the space in the password line. It should be:

    define("__CA_DB_PASSWORD__", '');

    (This assumes that you really don't have a MySQL root password set)

  • edited January 26

    OK, I am finally at a plain "login was invalid" page. Does this mean my MYSQL root password set exists, and it should be changed to match ''?When I try to change the password to be what the MYSQL password should be, the errors all return... Setting the password to''is the only thing keeping the major errors away as of now.

  • What errors exactly? Please post a screen shot.

  • edited January 26

    Attempt 1: this is what the login looks like with the User set to "root", and the password set to "". Just a plain "Login was invalid" screen

    Attempt 2: if I change the username to "Rachael" and set the password to "1234" (just an example) then I see these errors in the second screenshot upon reloading.

    Attempt 3: Username is "root" and password is "1234": the same errors as attempt 2.... -even if I use the password that should be the password for the MYSQL account. I'm just using 1234 as an example...

    Maybe it has something to do with this part??:

    GRANT ALL on my_archive.* to my_user@localhost identified by 'my_password';


    Further edit: I just went in and went to MYSQL:

    mysql -uroot

    and then retried adding the information:

    GRANT ALL on myArchive.* to root@localhost identified by '';

    (the name is myArchive, not my_archive)

    then I quit: \q

    and restarted:

    sudo apachectl -k restart

    But it still did not work.... with the settings set back to root for the username and "" for the password. It is still saying the password was invalid. (but no error messages)

  • Hi,

    Set the MySQL login in setup.php to root with no password, then go to http://localhost/ca/install and reinstall. When the install is done it'll display a valid login for you to use. If there are errors on install it'll tell you what went wrong. Either you didn't note the CA login (which is different from the MySQL login) or your initial install failed.

    Either way, the login you use to log into CA will never be the same as the one used for the database connection in setup.php. I think that's part of the problem here.


  • OK, removed CA using 'sudo rm -R'

    I redownloaded it. And I am now seeing this error:

  • edited January 26

    The ONLY part going wrong during installation is the following command:

    sudo chown -R www app/tmp app/log media vendor

    Here I got an error:

    MacBook-Pro:ca reitano$ sudo chown -R www app/tmp app/log media vendor

    chown: app/tmp: No such file or directory

    So, I went into app, and made the tmp directory, and returned to the ca folder to run the command again. It now works. But I wonder if this missing tmp directory may be the issue? I know the file mentioned in the site is a completely different file though..

    Maybe I should change 'name_of_my_database' in /usr/local/var/www/ca/app/lib/Db/mysqli.php line 144: to "myArchive"?

    Thank you so much for working with me on this... I really appreciate your time.

  • edited January 26

    Oh boy... dumb mistake....This time I forgot to change the database name to myArchive... I did that, and now I have this page (see first screenshot), so I went into the terminal and found the location and saw that the collectiveaccess directory is missing. So I made a new directory, but still don't have permissions... I think I may do this AGAIN. Maybe me forgetting to name the directory ruined the process.

  • Maybe start new and follow the Mac instructions line for line?

  • Ugh, another update... I reran the two commands to make the files writable:

    cd  /usr/local/var/www/ca
    sudo chown -R www app/tmp app/log media vendor
    sudo chmod -R 755 app/tmp app/log media vendor

    And am back to a plain "Login was invalid" screen.

    I can't believe it... The finagling will continue. I have no idea how I am still locked out.

  • Again, your CA login is NOT the same as the database login credentials.

  • edited January 26

    OK...... I cannot figure this out. This is what you wrote me earlier:

    "You seem to have two different logins set up – the "my_database_user" one is the placeholder value in the setup.php template. The other one is presumably you..."

    I have looked all in the CA file and there is only one place for the user. I don't see any other place where I put myself - "the other one" which you mentioned.

    I also went into MYSQL and did everything I could to ensure it is set to root with no password. (see the screenshot). I am using another friend who is also a computer programmer but we just don't see what the issue it...

  • edited January 26

    There are two sets of login credentials in play here:

    1. There is a login that application uses to access the database. This is the login info you put in setup.php. I wrote that you had two different logins set up _in setup.php_. I'm guessing you have one for Providence and one for Pawtucket, but that's just a guess based upon the fragments you've posted.
    2. The application's web interface has a login it creates on install. The installer will give you this login information when the installation successfully completes.

    These two sets of login information are completely separate. Just set up the MySQL database as described in the install docs, put the MySQL login info in setup.php, run the installer, and then use the login information it gives you to log into the web interface. This login will NOT be the same as the one you've put in setup.php.

    You seem to be using the MySQL login info in the CA web interface, which I think it the problem, but again this is just an educated guess because it's difficult to follow exactly what you've done through these posts.

  • Oh my goodness I am in!!!!!

    Wow.... I learned so much... Thank you for your help, and really spelling that out for me in the end. The second point is what made me realize the final mistake.

    Here is every problem I encountered that was not in the guide I was using:

    1. I had to change servername within /usr/local/etc/httpd/httpd.conf to be http://localhost:8080/ca before I could connect with the Web.
    2. app/tmp did not exist when I downloaded and cloned CA from the git, preventing the second to final command from executing. ( sudo chown -R www ) I had to manually create the tmp directory within the app directory before I could run this second to last command successfully.
    3. For some reason, DublinCore didn't download and wasn't on the dropdown menu. So I manually made a dublincore_qualif_2018.xml file in install/profiles/xml folder, then copied the text from the raw code on the git and pasted it within the new file for it to appear in the dropdown menu. (
    4. I didn't see that the important login information would be given upon installing from the Web! To reinstall from the Web and get the login information, I had to first go into MySQL and manually drop (delete) the database I made (myArchive) and make a new one again, following the instructions. Then, I could reinstall without the error message popping up saying that the ca_acl database existed already and that I had already downloaded Collective Access.

    I hope these details can help someone else out if they are struggling on a Mac!

    Thank you, Seth!

  • This is great. Thanks for sharing. We'll look to revise the installation instructions to take these tips into account.

Sign In or Register to comment.