Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st November 2005, 17:20
happyhd happyhd is offline
Junior Member
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default sadly, not so smooth anymore

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: 'root@localhost' (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"];
$this->connect();
}

// 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);
flush();
}
}

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

function query($queryString)
{
if(!$this->connect())
{
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
__________________
- Computers need Linux as Man need God
Reply With Quote
Sponsored Links
  #2  
Old 1st November 2005, 17:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

You have to put your new MySQL password into /home/admispconfig/ispconfig/lib/config.inc.php.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 1st November 2005, 18:23
happyhd happyhd is offline
Junior Member
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 config.inc.php, no success yet..
__________________
- Computers need Linux as Man need God
Reply With Quote
  #4  
Old 1st November 2005, 18:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

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/config.inc.php. And the password must not contain special characters.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 1st November 2005, 19:20
happyhd happyhd is offline
Junior Member
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ?
__________________
- Computers need Linux as Man need God
Reply With Quote
  #6  
Old 1st November 2005, 19:39
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,385
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

Quote:
Originally Posted by happyhd
But since (very glad to learn that) ISPconfig and MySQL password are separate, any idea why ISPconfig password isn't working anymore ?
Which error message do you get?

Quote:
Is there a file I can edit for this password too ?
The password is in the mySQL database, if ISPConfig can not login into the mySQL database with the database password in the config.inc.php file you cannot login into ISPConfig.
Reply With Quote
  #7  
Old 1st November 2005, 19:44
happyhd happyhd is offline
Junior Member
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
__________________
- Computers need Linux as Man need God
Reply With Quote
  #8  
Old 1st November 2005, 19:55
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,385
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

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 config.inc.php file as falko suggested.

http://www.howtoforge.com/forums/sho...34&postcount=4
Reply With Quote
  #9  
Old 1st November 2005, 20:27
happyhd happyhd is offline
Junior Member
 
Join Date: Oct 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
__________________
- Computers need Linux as Man need God
Reply With Quote
  #10  
Old 1st November 2005, 20:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
 
Default

Quote:
Originally Posted by happyhd
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".
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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webconfig at port 81 not working anymore maxx Installation/Configuration 6 23rd October 2006 10:23


All times are GMT +2. The time now is 09:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.