PDA

View Full Version : Trouble in paradise...


web-worlds
28th August 2006, 14:58
Hi,

I am allready since some time a happy ISPconfig user and mostly everything runs smootly, but this morning I wanted to create a MySQL database via the ISPconfig site, and something went wrong, I dont know what everything seems te be okay, but when I loged out of the ISPConfig and tried to re-login it gives me the following message...

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 76

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 76

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

Anybody have a clue ghow to solve this ?

Thanks in advance,
Etienne (web-worlds)

web-worlds
28th August 2006, 15:04
Backtracing my steps I think that I know what happened...

I created a database for a site where I named the DB owner root, with the root password, then I removed the database, so I am afraid that I also deleted the root database user, because also via phpMyAdmin I cannot
login anymore as root ... :eek: :eek: :eek:


HELP :confused:

Etienne (web-worlds)

web-worlds
29th August 2006, 00:42
Anybody that can help out ???

Thanks in advance
Etienne (web-worlds)

till
29th August 2006, 09:38
Backtracing my steps I think that I know what happened...

I created a database for a site where I named the DB owner root, with the root password, then I removed the database, so I am afraid that I also deleted the root database user, because also via phpMyAdmin I cannot
login anymore as root ... :eek: :eek: :eek:

How did you do that, in ISPConfig?

To create a new root user for mysql, stop the mysql daemon, then you will be able to start the mysql daemon with the option --skip-grant-tables, then login with the root user without providing a password on the shell and create a new root user entry in the users database.

web-worlds
29th August 2006, 13:00
Hi Till,

Thanks for your reply, yes I did it in ISPConfig, I am willing to recreate it, but I still cant get into my MySQL, here is what I did:

In a terminal window:

/etc/init.d/mysql stop

It tells me that the service is stopped, and I type:

mysqld_safe --skip-grant-tables

It then tells me:

[1] 24632
server1:~ # Starting mysqld daemon with databases from /var/lib/mysqlThen it doesnt show a prompt, but I can go on, so I type:

mysql -u root

Then it tells me 'Welcome t mySQL monitor etc, and I type:

use mysql;

It tells me that it changed the database, so I type:

update user set password=PASSWORD("new-password") where User='root';It tells me:

Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

So I type:

flush privileges;

Then it tells:

Query OK, 0 rows affected (0.00 sec)

Then I type:

quit

It then quits the MySQL monitor and brings me back to prompt, there I type:

/etc/init.d/mysql stop

It then tells me that MySQL safe is stopped, and I type:

/etc/init.d/mysql start

It then starts the MySQL service, then I type:

mysql -u root -p

Then it asks me for the password, I type the password that I just set, and it tells me:

ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
And I end up with the prompt

What do I do wrong???

Thanks in advance,
Etienne (web-worlds)

till
29th August 2006, 15:06
I guess you will have to insert a new root user for the host localhost instead of updating it.

web-worlds
29th August 2006, 15:20
Oef...

And how will I do that, can you assist me in this ?

Kind regards,
Etienne

till
29th August 2006, 15:41
Just answered your pm.