SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Access denied for user (was "mySQL error on eCom")

    Hello all !
    New here and hope to hang around.
    I am working on an eCommerce site and recently moved it from one host to another. I did a backup of the home directory and the database. Once the domain was forwarded, I did a restore on both the home dir and db. The first attempt on the DB restore, nothing happened. Attempted again and it now shows a dB and 47 tables...good.

    The bad news is now, it seems, the DB names, user id and passwords are off. This is the error that returns when I try to access the page:

    Warning: mysql_connect(): Access denied for user: 'magazin_phil@localhost' (Using password: YES) in /home/magazin/public_html/catalog/includes/functions/database.php on line 19
    Unable to connect to database server!

    I went into both the database.php file and the configure.php file to check consistancy. The configure file seems to be off but what do I name the database and what is the user and pass? I would think it would be brought over from the backup. My eyes are tired of looking at this issue.

    Thank you for any help, suggestions or comments!

  2. #2
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to have the same user and id in the mysql database within the user table. You would also have to set up appropriate permissions for that user to connect to the database for select, update etc.

    this would be independent of a database that you are referring to.

  3. #3
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the quick reply. How do I find out the user/pass and the database name to insert into the configure.php file? It seems to be an easy correction but I'm not sure where to look.

  4. #4
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    magazin_phil is the username. you can create the password that you want. you don't place that in the configure.php file, you need to add it to the mysql database, user table. Look in the manual under GRANT and REVOKE privileges for more info on adding a user.

  5. #5
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would suggest that you see if your host has phpmyadmin or cpanel. That makes adding mysql users so much easier.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •