Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: mgic_box on May 09, 2008, 01:51:47 PM

Title: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using passwo
Post by: mgic_box on May 09, 2008, 01:51:47 PM


  Hello, Good day,

  After having intaled phpMyAdmin 2.11.1.2, acording instructions here:

  http://wiki.contribs.org/PHPMyAdmin

  When I:

  To access PHPMyadmin, go to your-domain/phpmyadmin
The initial login and password for phpmyadmin is login="admin" & password="admin"

  I Got:

------------------
Welcom to phpMyAdmin 2.11.1.2

Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.

Error
Mensagens do MySQL : 

#1045 - Access denied for user 'root'@'localhost' (using password: NO)
----------------
 
  Is this normal?

  Should I "use setup script to create one."

  Or is tomething wrong?

  Thanks in advance.


Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: cactus on May 09, 2008, 01:58:24 PM
Fix (until fixed in a new release) is here: http://bugs.contribs.org/show_bug.cgi?id=4321#c3
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: mgic_box on May 09, 2008, 04:38:01 PM
Fix (until fixed in a new release) is here: http://bugs.contribs.org/show_bug.cgi?id=4321#c3

 Thnk you for your fast reply,

 But not worked!!!! ????
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: cactus on May 09, 2008, 04:42:23 PM
Thnk you for your fast reply,

 But not worked!!!! ????


You are sure you did this:

Code: [Select]
expand-templete /opt/phpmyadmin/config.inc.php
Did it output any failure message?

What is the contents of /opt, please do
Code: [Select]
cd /opt; ls -la
What is the output of
Code: [Select]
mysql -e "SHOW DATABASES"
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: mgic_box on May 09, 2008, 04:45:06 PM
Fix (until fixed in a new release) is here: http://bugs.contribs.org/show_bug.cgi?id=4321#c3

 I got this problem, since I used this repair:

To repair this you can follow this:

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Resetting_the_MySQL_root_password

[/quote]

 I had phmyadmin working... til done thais repair...

 Now, deinstaled... reinstaled phpmyadmin, and still unable to use phpmyadmin.







Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: cactus on May 09, 2008, 04:49:20 PM
And why did you try to reset the root password? You should not start such drastic measures unless you really now what you are doing.

I think the problem is somewhere else, please answer the questions in this post (http://forums.contribs.org/index.php?topic=40969.msg190413#msg190413).
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: mgic_box on May 09, 2008, 04:49:39 PM

 Moved to Webmin!!!!

 Why, if I am the administrator of the machine, I do not know the password of the database?


 Found the password.

 Do

 cat /opt/phpmyadmin/config.inc.php

 Regards
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: mgic_box on May 09, 2008, 04:51:05 PM
And why did you try to reset the root password? You should not start such drastic measures unless you really now what you are doing.


 The full stoy is here:

  http://forums.contribs.org/index.php?topic=40938.msg190143#msg190143

  Regrds.
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: mgic_box on May 09, 2008, 04:57:18 PM
You are sure you did this:

Code: [Select]
expand-templete /opt/phpmyadmin/config.inc.php
Did it output any failure message?

What is the contents of /opt, please do
Code: [Select]
cd /opt; ls -la
What is the output of
Code: [Select]
mysql -e "SHOW DATABASES"



Code: [Select]
[root@alas lib]# cd /
[root@alas ~]# expand-template /opt/phpmyadmin/config.inc.php
[root@alas ~]# cd /opt/
[root@alas opt]# ls -la
total 12
drwxr-xr-x   3 root      root   4096 Oct 19  2007 .
drwxr-xr-x  27 webmaster shared 4096 May  9 16:14 ..
drwxr-xr-x  11 root      root   4096 May  9 16:51 phpmyadmin
[root@alaska opt]# mysql -e "SHOW DATABASES"
+-----------+
| Database  |
+-----------+
| caem      |
| cfc       |
| egasm |
| era   |
| horde     |
| mysql     |
| sme7admin |
+-----------+
[root@alas opt]#
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: mgic_box on May 09, 2008, 05:02:41 PM
You are sure you did this:

Code: [Select]
expand-templete /opt/phpmyadmin/config.inc.php
Did it output any failure message?

What is the contents of /opt, please do
Code: [Select]
cd /opt; ls -la
What is the output of
Code: [Select]
mysql -e "SHOW DATABASES"


 Now it is working!!!!

 Problem solved.

 Sorry for beeing stupid!

 But I am shure, I have done as what was explined ...  (http://bugs.contribs.org/show_bug.cgi?id=4321#c3)

 I think that I do not uderstand nothing of this...

 AnyWay Thank you!

Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: cactus on May 09, 2008, 05:08:09 PM
Why, if I am the administrator of the machine, I do not know the password of the database?
Because on SME Server the root password is a random 72 charachter string for security reasons, by a clever mechanism you do not need to type, remember nor know it, because when you login to the SME Server shell as root and issue the mysql command it is automatically filled in.

Furthermore you should only use the root account for administration purposes and never configure an application to use it, create a separate user with the minimal required privileges for the application and configure the appplication to use that user, please read the MySQL FAQ in the wiki as a lot of MySQL related stuff on SME Server is there, furthermore the MySQL manual itself is worth reading I guess.
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: cactus on May 09, 2008, 05:10:39 PM
Code: [Select]
[root@alas opt]# ls -la
total 12
drwxr-xr-x   3 root      root   4096 Oct 19  2007 .
drwxr-xr-x  27 webmaster shared 4096 May  9 16:14 ..
drwxr-xr-x  11 root      root   4096 May  9 16:51 phpmyadmin
So the source directory was there ....

Code: [Select]
[root@alaska opt]# mysql -e "SHOW DATABASES"
+-----------+
| Database  |
+-----------+
| caem      |
| cfc       |
| egasm |
| era   |
| horde     |
| mysql     |
| sme7admin |
+-----------+
[root@alas opt]#
But your database is not... as no phpmyadmin is listed there.
Title: Re: phpMyAdmim Error #1045 - Access denied for user 'root'@'localhost' (using pa
Post by: byte on May 09, 2008, 06:54:00 PM
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!