phpmyadmin Error #1045

Discussion in 'Installation/Configuration' started by JEU, Sep 1, 2011.

  1. JEU

    JEU New Member

    Hi, im getting that error when i try to log over web on phpmyadmin using a user and its password for a database. I can login as root user without a problem in phpmyadmin, and i can access to the database with the user/pass from the command line with mysql so i know that the user/pass are both fine, is just when i try to login trought phpmyadmin that i have the problem, any hints?? :confused:

    Thks in advance.

    P.S.: Im using debian squeeze + ispconfig3 last version.
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    What is the exact error message, not only the error code?

    Did you maybe restrict the user to allow access from loopback, only but configured mysql to access the public IP?
  3. JEU

    JEU New Member

    "#1045 El servidor MySQL no autorizó su ingreso" (spanish)

    mysql is on default config (or the config that ispconfig3 installer modified by itself)

    Let me clarify:

    I created a client "myclient"
    I created a site "mysite" for that client and then a database "mysitedb" for that site, then i created a user "dbadmin" for "mysitedb", when i try to log him over phpmyadmin to access his db (mysitedb) i got that error.

    Besides, if i log in phpmyadmin with root / rootpass does work (and i see mysitedb), if i test the user "dbadmin" in command line, works fine against mysql and i can access "mysitedb", the problem is when i try to log with that user over phpmyadmin to access its database.
    Last edited: Sep 1, 2011
  4. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Well maybe sb. else can help regarding the mysql users created with ispconfig 3 as I do not know the process.

    So how is your mysql server configured in phpmyadmin? When configuring it to use "localhost" it ignores the port and uses the local socket instead (as the mysql client does on the commandline). If entering the IP-Adress ( or the external host IP) it does not.
    If then the mysql user you are referring to is added with no remote access allowed the authentication will fail.

    So what you should check, is the "Host" entry in the User-table of the mysql database for the referred users:
    localhost means no remote connection, whereas e.g. % means connections from anywhere.

    After that you should check the configuration of your mysql server in phpmyadmin.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post a screenshot of the database settings of this databse in ispconfig.
  6. JEU

    JEU New Member

    cat /etc/phpmyadmin/config-db.php
    ## database access settings in php format
    ## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
    ## by /usr/sbin/dbconfig-generate-include
    ## Thu, 25 Aug 2011 16:21:19 -0300
    ## by default this file is managed via ucf, so you shouldn't have to
    ## worry about manual changes being silently discarded.  *however*,
    ## you'll probably also want to edit the configuration file mentioned
    ## above too.

    Attached Files:

  7. JEU

    JEU New Member


    Following the advice of Ben Fixed It!! :)

    Thks guys u r really awesome :D
  8. erosbk

    erosbk New Member

    How did you fix it? did you add a remote IP in the panel?
  9. JEU

    JEU New Member

    No, checked myphpadmin configuration and was fine, then logged on mysql and checked the user rows on the users table of mysql and was a mess, so i fixed that, cleared cookies on ffox and then it worked :)
  10. erosbk

    erosbk New Member

    So, in mysql database you replace localhost for IP of server with phpmyadmin for every user?
  11. JEU

    JEU New Member

    In fact, was the exact opposite. I was having and replaced it with localhost. No idea how that went there, but since im not the only that could be touched configuration i supposed was somebody else dirty hands, then i changed back to localhost :D
  12. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Or it was the dirty hands guy's assumption that localhost is in all cases equal to :)

Share This Page