Cant connect to mysql database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atelsth
    Junior Member
    • Jul 2005
    • 5

    #1

    Cant connect to mysql database

    I'm trying to setup a connection to a mysql database because I'm installing Gallery2.

    When I try, Gallery2 gets back this message:

    localhost: Access denied for user: 'atelsth_tom2@localhost' to database 'atelsth_pics

    When I created the mysql database, I named it pics and cpanel shows a database named atelsth_pics (atelsth is the username for the website). I added a username of tom2 and cpanel shows a user of atelsth_tom2 and of course I added a password.

    When I give Gallery2 the information to connect to the data base I use DB name=atelsth_pics, username=atelsth_tom2, host=localhost, and password=password, but I keep getting the error shown above. Any ideas?

    My post on this same subject can be seen on the Gallery forum here

    Also, I tried all fo the combinations of username and DB name with and with out the underscores and the stuff before them etc.

    Thanks much
  • jobe
    Member
    • Oct 2004
    • 50

    #2
    A bit obvious but did you add the user to the database. Easily missed out stage.

    Comment

    • atelsth
      Junior Member
      • Jul 2005
      • 5

      #3
      Yes, I did add the user. It shows up as atelsth_tom2 even though I entered it as tom2.

      Comment

      • jobe
        Member
        • Oct 2004
        • 50

        #4
        Yes, it puts the account name before the name you choose.

        And then you have to add it to the database - below the datebase whare all the boxes - the privileges - are - you have 'Add User to DB' - above there is a drop down box of all the Dbs & users & you match up there & click the 'Add User to DB'.

        Comment

        • atelsth
          Junior Member
          • Jul 2005
          • 5

          #5
          Well son of a beach!

          I had been adding the user in the add user section but I guess I never noticed the button that associates the user and the database.

          Thanks Jobe!

          Comment

          Working...