#1  
Old 19th June 2006, 10:06
glt50 glt50 is offline
Junior Member
 
Join Date: Jun 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy ispconfig setup and mysql

Hi

I have done the dumbest thing and need some help. I cannot remember my MYSQL password, so in setting up ispconfig, it askes me for mysql password and every password I enter is invalid and I cannot progress my installation.

How can I overcome this problem? Can the password be reset? And if it can, can the password be changed while the ispconfig program is halted and waiting for my password?

Glen
Reply With Quote
Sponsored Links
  #2  
Old 19th June 2006, 11:11
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

You can try this:

1) Login with a second SSH session to your server.
2) Stop the mysql daemon:

/etc/init.d/mysql stop

3) Start mysql with the following command:

mysqld --skip-grant-tables

4) Login to mysql with the mysql command and reset the root password:

mysql -u root
UPDATE mysql.user SET Password=PASSWORD('MyNewPassword') WHERE User='root';
FLUSH PRIVILEGES;
quit;

Replace MyNewPassword in the commands with your new password.

5) Stop mysql:

killall mysqld

6) start the normal mysql daemon again:

/etc/init.d/mysql start

7) Proceed with your ISPConfig installation.

The steps above may vary depending on your linux distribution.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 19th June 2006 at 16:08.
Reply With Quote
  #3  
Old 19th June 2006, 22:20
stand-up stand-up is offline
Junior Member
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Same Thing But about passwd (Sorry !!!) need Help !

Hello,
I have a good installation of Ubuntu server 6, updated, and a successful installation of IspConfig: OK
I change the password admin and I am not any more able to connect, to log on to IspConfig.
I try to connect to phpmyadmin, I try to change the admin password, but no success at all!! (Very fun, for me!!!)
Could somebody help me, I have been for more than 2 hours in front of the machine, and I receive the same answer when I connect to IspConfig ( Ialso try to use a null passwd, but no success):

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 78

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php:78) in /home/admispconfig/ispconfig/web/login/login.php on line 56

Thanks for the support

Last edited by stand-up; 19th June 2006 at 22:22.
Reply With Quote
  #4  
Old 19th June 2006, 22:42
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

The mysql user and password ISPConfig uses to connect to the database is stored in the file /home/admispconfig/ispconfig/lib/config.inc.php

If this username and password are incorrect, you will get the errors that you posted above.

Reset the mysql root password like i described in the post above and then put the new mysql root password in the ISPConfig config.inc.php file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 28th June 2006, 04:09
Dimitriy Dimitriy is offline
Junior Member
 
Join Date: Jun 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you please sticky post #2?

Help me so many times......
Reply With Quote
  #6  
Old 17th July 2006, 08:27
godsdog godsdog is offline
Member
 
Join Date: Apr 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default I had same MySQL problems

Hi. I had exactly the same errors of not being able to enter either of the following commands during Perfect Fedora Core 5 Setup...
Code:
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
Both returned the same error as explained at the root of this thread.
At the end of ISPConfig install I encountered this and just used the user admin with no pass...
Code:
Please enter your MySQL user:admin
Please enter your MySQL password:
OK
Please enter a name for the ISPConfig database (e.g. db_ispconfig):db_ispconfig
Then after a few lines I noticed
Code:
Please select the protocol (http or https (SSL encryption)) to use to access the ISPConfig system:
1) HTTPS
2) HTTP
Your Choice: 1

Connected successfully to MySQL server
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'db_ispconfig'
Restarting some services...
And at the end of the install I get
Code:
Starting ISPConfig system...
/root/ispconfig/httpd/bin/apachectl startssl: httpd started

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /root/ispconfig/scripts/lib/config.inc.php on line 47
No results found!ISPConfig system is now up and running!
Congratulations! Your ISPConfig system is now installed. If you had to install quota, please take the steps described in the installation manual. Otherwise your system is now available without reboot.
Obviously I can't login to the web interface to ISPConfig. Shall I reinstall all MySQL rpms and try installing ISPConfig or is there an easier way? Thanks again.

Last edited by godsdog; 17th July 2006 at 08:30.
Reply With Quote
  #7  
Old 17th July 2006, 12:33
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

Quote:
Originally Posted by godsdog
Obviously I can't login to the web interface to ISPConfig. Shall I reinstall all MySQL rpms and try installing ISPConfig or is there an easier way? Thanks again.
It is not nescessary to reinstall mysql, just set a new mysql root password as I described in post #2.

You got the mysql install errors beacuse you did not enter a valid mysql password.

1) Mkae sure your mysql database is listening on localhost. You can check that with:

netstat -tap

as described in the perfect setup howtos.

2) Remove the directories /home/admispconfig and /root/ispconfig and install ISPConfig again.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 17th July 2006, 15:18
godsdog godsdog is offline
Member
 
Join Date: Apr 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are right and I didn't look close enough when I peformed the netstat -tap command. This is what I get
Code:
tcp        0      0 *:mysql                     *:*                         LISTEN      3310/mysqld
It seems the port number is wrong?!? whoops...
---
At any rate, here's what I get when I attempt a password change with the way things are at the moment.
Code:
# mysqladmin -u root password password
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Here's the sniped output of /home/admispconfig/ispconfig/lib/config.inc.php if it helps
Code:
$go_info["server"]["db_host"] = "localhost";
$go_info["server"]["db_name"] = "db_ispconfig";
$go_info["server"]["db_user"] = "admin";
$go_info["server"]["db_password"] = "";
$go_info["server"]["db_type"] = "mysql";
I tried this to see if it is functioning
Code:
# useradd -d /dev/null -s /bin/false root
useradd: user root exists
# useradd -d /dev/null -s /bin/false tester
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Then I tried to telnet into it and got some weird characters
Code:
# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
4
5.0.22\?giYa\+,\pA0jJr~DwKOConnection closed by foreign host.
I've preformed all installations after the local via putty if it's any 'consol'ation

Last edited by godsdog; 17th July 2006 at 15:50.
Reply With Quote
  #9  
Old 17th July 2006, 17:46
godsdog godsdog is offline
Member
 
Join Date: Apr 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default update...hmph...

At any rate, unless you are interested in how I managed to muck this up, I plan on nuking the drive and installing this wonderful new version I noticed you released today. (I should have held off yesterday) but for the sake of learning, we'll just start from square one.
Reply With Quote
  #10  
Old 18th July 2006, 12:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
 
Default

Quote:
Originally Posted by godsdog
It seems the port number is wrong?!? whoops...
No, the port number is correct.
Quote:
Originally Posted by godsdog
At any rate, here's what I get when I attempt a password change with the way things are at the moment.
Code:
# mysqladmin -u root password password
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Have a look here: http://www.howtoforge.com/forums/sho...24&postcount=5
__________________
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
perfect setup suse 10 - phpmyadmin & mysql question reddog Server Operation 7 17th June 2006 12:59
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16
MySQL error during setup jon335 Installation/Configuration 6 6th October 2005 18:39
Problem installing ISPConfig, then with MySQL... ctroyp Installation/Configuration 7 26th September 2005 16:37
MYSQL and the perfect setup 9.2 Suse pkfrizzlefry HOWTO-Related Questions 7 21st May 2005 20:12


All times are GMT +2. The time now is 14:15.


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