sadly, not so smooth anymore

Discussion in 'Installation/Configuration' started by happyhd, Nov 1, 2005.

  1. happyhd

    happyhd New Member

    Feel like I'm abusing the forum here, need help again ! Everything worked, then I changed my password in phpmyadmin and I'm not allowed access anymore... I had this error before, but then I had mistyped (or so I think) during setup. Since then I've reinstalled and things where working, but no that error is back... after typing in username/password (I've tried every combo on the pc/in ISPconfig) it tells this error :

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user: '[email protected]' (Using password: NO) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 76

    Below is that file in case it helps !

    /home/admispconfig/ispconfig/lib/classes# nano ispconfig_db_mysql.lib.php :

    class db_mysql
    var $dbHost = ""; // hostname of the MySQL server
    var $dbName = ""; // logical database name on that server
    var $dbUser = ""; // database authorized user
    var $dbPass = ""; // user's password
    var $linkId = 0; // last result of mysql_connect()
    var $queryId = 0; // last result of mysql_query()
    var $record = array(); // last record fetched
    var $autoCommit = 1; // Autocommit Transactions
    var $currentRow; // current row number
    var $errorNumber = 0; // last error number
    var $errorMessage = ""; // last error message
    var $errorLocation = "";// last error location
    var $show_error_messages = false;

    // constructor
    function db_mysql()

    global $go_info;
    $this->dbHost = $go_info["server"]["db_host"];
    $this->dbName = $go_info["server"]["db_name"];
    $this->dbUser = $go_info["server"]["db_user"];
    $this->dbPass = $go_info["server"]["db_password"];

    // error handler
    function updateError($location)
    $this->errorNumber = mysql_errno();
    $this->errorMessage = mysql_error();
    $this->errorLocation = $location;
    if($this->errorNumber && $this->show_error_messages)
    echo('<br /><b>'.$this->errorLocation.'</b><br />'.$this->errorMessage);

    function connect()
    if($this->linkId == 0)
    #mynote:line 76 --> $this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
    $this->updateError('DB::connect()<br />mysql_connect');
    return false;
    return true;

    function query($queryString)
    return false;
    if(!mysql_select_db($this->dbName, $this->linkId))
    $this->updateError('DB::connect()<br />mysql_select_db');
    return false;

    I removed the rest from here since it was over the 10000 characters limit
  2. falko

    falko Super Moderator ISPConfig Developer

    You have to put your new MySQL password into /home/admispconfig/ispconfig/lib/
  3. happyhd

    happyhd New Member

    Sorry, I just have to get this straight :

    ISPconfig login name/password can be different from Mysql ?

    Cause Ispconfig login failed after I changed mysql password from blank to a password different than that to login to ISPconfig. Also ISPconfig defaults to user:admin and mysql to user:root , IF I got it right.

    Anyway, I tried typing the password into, no success yet..
  4. falko

    falko Super Moderator ISPConfig Developer

    You have a login for the MySQL database, in this case root and a password, and you have a login for ISPConfig, admin and another password, and both logins are totally independent from each other.

    You have to put your new MySQL password into the variable $go_info["server"]["db_password"] in /home/admispconfig/ispconfig/lib/ And the password must not contain special characters.
  5. happyhd

    happyhd New Member

    Hi again

    I have set it like this :

    $go_info["server"]["db_password"] = "mypasswordhere";

    Can't reach phpmyadmin since I can't get past ISPconfig login.

    But since (very glad to learn that) ISPconfig and MySQL password are separate, any idea why ISPconfig password isn't working anymore ?

    Is there a file I can edit for this password too ?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Which error message do you get?

    The password is in the mySQL database, if ISPConfig can not login into the mySQL database with the database password in the file you cannot login into ISPConfig.
  7. happyhd

    happyhd New Member

    thanks for the reply !

    Please see the first post in this thread for the error message.

    I used to be able to login to ISPconfig with admin + password, then I changed my MySQL password in phpmyadmin via the tools menu in ISPconfig, and when I clicked the little green exit button in phpmyadmin to logout, it asked for password for user root, probably since I changed it. I typed the newly added password (was blank before) and it refused saying it was the wrong password. I tried typing a blank password, like before, refused again. I closed the window, tried logging in to ISPconfig again just to see that error as typed in the first post.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I've seen the error message in the first thread. I thought you followed falkos advice and fixed the mysql login. The error has nothing to do with your ISPConfig password. Its simply the error that ISPConfig is not able to login to the database.

    Please update the login data in the file as falko suggested.
  9. happyhd

    happyhd New Member

    I followed Falko's advice, and I'm sorry if I didn't made that clear.
    By no means am I ignoring your advices :)

    The error was this : MySQL needed to be restarted.

    After restarting mysql on the server I could now log into ISPconfig with admin + ISPconfig password. Via phpmyadmin I could log into mysql with root + the new password.

    When loging out of mysql, same happens, asks for password for user root, no password helps. I click cancel, get back to ISPconfig screen, all well, can log into phpmyadmin again, same exit problem.

    But entering the password in the file mentioned helped !! I can now log in, just not log out "cleanly".

    Summary : I did as told ;) Results was delayed because mysql needed restart, but as said, that exit error still occurs. So this was a big leap in the right direction. Appreciated response indeed. :D
  10. falko

    falko Super Moderator ISPConfig Developer

    You mean from phpMyAdmin? It's normal that it asks for a user and password as soon as you click on "Exit", because at that point of time you're already logged out.
  11. happyhd

    happyhd New Member

    Yes from phpmyadmin !

    Glad that it's normal, seems like a very good thing that you don't have that "cookie" feeling you can get when loging out of some apps..

    To bad it doesn't recognize my password then, anyway, I can log in and do what I want so I guess I should be happy :D

    You have done a great job answering my questions as they have come forth, I get flashbacks to my very first forum post (haven't been too many before ISPconfig) when totally new to linux.... friendly ppl indeed !

    Call me emotional but I value these things ;)

    Now, it's off to web development !

Share This Page