Can't connect to Database after Update

Hi, I recently updated my Zenphoto to version 1.6.4. Since the update the setup can't access the database anymore. Even if I install a new instance and running the setup I get the error ' Access denied for user 'test1'@'localhost' (using password: YES)'. I am using PHP 8.2.3 and MySQL 8.0.27. My older Zenphoto Version (1.5.x) was working fine. Thanks for your help
Norbert

Tags:

Comments

  • acrylian Administrator, Developer

    Please check that you really are using the right credentials for your database and that you filled in all fields available in the config file. On basically all webhosts i know "localhost" does not work as the database server name.

  • NHTEC Member

    The credentials are 100% correct - because they worked in the previous working. Also I tested the credentials through a second way.....

  • acrylian Administrator, Developer

    A few things changed since 1.5.x regarding credentials to comply with PHP 8+ ways so not all sadly may work as they did previously.

    Is that the full error message from the debug log?

  • acrylian Administrator, Developer

    Just to note to be sure the db fields are in 1.6.x these:

     $conf['db_software'] = 'MySQLi';       // or "pdo_mysql"
     $conf['mysql_user'] = '';      
     $conf['mysql_pass'] = '';      
     $conf['mysql_host'] = ''; 
     $conf['mysql_database'] = '';      
     $conf['mysql_prefix'] = ''; 
     $conf['mysql_port'] = "3306";  // default should work generally
     $conf['mysql_socket'] = ""; // optional
    
  • NHTEC Member

    Thanks for the response. I filled out all the above fields, but it was not working. However, I change my database password and with the new password it was working. As I said the password was correct (and it tested it), but somehow Zenphoto was not able to use it. Anyway, I got it working.

  • acrylian Administrator, Developer

    We had a issue and fix in some 1.6.x version - don't remember offhand which - regarding some chars that were not working due to some PHP internals and needed escaping.

    Did the passwort contain any special chars like accents, umlauts or similar?

  • NHTEC Member

    This was the log file:
    {7627:Thu, 01 Aug 2024 05:46:49 GMT}
    ZenphotoCMS database credentials are incomplete or wrong. Check your config file settings and re-run setup.
    {7627:Thu, 01 Aug 2024 05:51:49 GMT}
    Access denied for user 'web2922'@'localhost' (using password: YES)
    dbBase::logConnectionError called from dbMySQLi->__construct (class-dbmysqli.php [28])
    from require_once (functions-basic.php [219])
    from require_once (functions.php [12])
    from include (index.php [14])
    from index.php [79]

  • acrylian Administrator, Developer

    That doesn't answer my question if the password contained any special chars.

  • NHTEC Member

    Sorry, I forgot to answer. It contained #!$

Sign In or Register to comment.