Alittle background first.

This website is currently up and running on another server. This was just a new transfer to a new server and i have run into a few snags already and cleared them up. Now i have bumped into this error and just can't seem to figure it out.

Fatal error: Uncaught exception 'Zend_Db_Adapter_Mysqli_Exception' with message 'Access denied for user 'name@localhost

So, personally i haven't done much with zend frameworks but i do realize that this must be a Database issue. What im wanting to know is does Zend create these DBs dynamically or are these something i have to recreate myself? I assumed with transferring all the files over that i would have to rebuild anything, just maybe change some url for some files.

Any ideas on what i can do to clean this error up?

    looks like a simple db permission error, your either using the wrong user name or the user name does not have to correct permissions, this is not specificity a zend issue.

      Trever,

      There are many methods to authentication with Zend Framework.

      It could very well be through a config (config.ini / config.xml) or could be a part of one of your controllers, etc.

      You may have to just take a look through the files to where it initializes the database connection.

      I have a portion of MY code below (uses a config.ini)

      $db = Zend_Db::factory($config->database);
      

      and I have a config.ini (in application/config)

      database.adapter			= pdo_mysql
      database.params.host		= localhost
      database.params.username	= username
      database.params.password	= password
      database.params.dbname	= database
      ...
      

      This is not hte only method of database connectivity but it may give you enough of an idea to find the vlaues you need to change.

      Check your boostrap.php / index.php / initializer.php (AGAIN, depending on the chosen setup of Zend Framework).

      If you follow index.php it will lead usually to some boostrap file (in my setups anyways).

        Thanks alot Big Nerd, i did find that config file to change those values.

        Another quick question, as i mentioned before im not to familiar with Zend but does Zend create Databases on the fly?

        Once i changed those values i am now getting an error saying "Unknown Database" so im assuming that there just isn't one, but i copied everything over. Before posting this reply i spent all day reading forums and looking through these php files, but to no avail am i able to find anything that is creating these databases.

        Also thank you both for your quick replies yesterday.

          hrmmmm i feel dumb for asking this, but could all this be caused because i didn't update the php.ini file to include the zend library?

            Write a Reply...