Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access denied for user 'admin'@'localhost'
#1
Hi all,

after being confused a lot with the installation of letoDMS I am finally at the point where I created letodms database through myphpAdmin and some test users. Of course there is admin user as well.
The problem is that when I try to go to localhost/letodms using admin/admin I get the following warning

Warning: mysql_connect(): Access denied for user 'admin'@'localhost' (using password: YES) in C:\wamp\www\adodb\drivers\adodb-mysql.inc.php on line 449

So it seems it cannot connect to the letodms db.I have hardcoded the admin username and password to the adodb-mysql.inc.php in the function _connect (just for testing). I cannot login with none of the users that there are in the letodms db.

I use windows XP, wampserver 2.2, mysql 5.5.24, php 5.4.3, Apache 2.2.22. Any ideas/suggestions would be appreciated.

Thank you.
Reply
#2
(11-23-2012, 11:36 PM)Superpan Wrote: Hi all,

after being confused a lot with the installation of letoDMS I am finally at the point where I created letodms database through myphpAdmin and some test users. Of course there is admin user as well.
The problem is that when I try to go to localhost/letodms using admin/admin I get the following warning

Warning: mysql_connect(): Access denied for user 'admin'@'localhost' (using password: YES) in C:\wamp\www\adodb\drivers\adodb-mysql.inc.php on line 449

So it seems it cannot connect to the letodms db.I have hardcoded the admin username and password to the adodb-mysql.inc.php in the function _connect (just for testing). I cannot login with none of the users that there are in the letodms db.

I use windows XP, wampserver 2.2, mysql 5.5.24, php 5.4.3, Apache 2.2.22. Any ideas/suggestions would be appreciated.

Your database connection cannot be made. This is way before login into letodms. The database user and a letodms user have nothing in common. There is also not need to hard code any username. That's what the settings.xml file is for.

Uwe
Reply
#3
Ok..that's what i thought..but i made the letodms db by putting the create tables sql file and i can see the db in phpmyadmin and its users.what should i configure to make the connection?? There are lot of configuration files on all these folders and i got confused. Any suggestions where should i start?? Are there any babysteps written anywhere? I follow some documentation i found in letodms wiki but no luck..i am sure i have missed something. Just to mention that the port i use is 3308 not the default one. Can you tell me all the files that this should be configured ?And also i logged in once with admin/ admin but only once. Next time i had no luck..
Thanks for any help.
Reply
#4
Hi,

Di you verified that the user admin has access to the database? I would suggest setting up a separate user for the database and grant him the rights to the database only.

To change the settings go to the directory conf within your LetoDMS installation and find settings.xml. In there, find the database section.

PHP Code:
<database
      ADOdbPath 
"adodbpath"
      
dbDriver "mysql"
      
dbHostname "localhost"
      
dbDatabase "nameofdatabase"
      
dbUser "dbuser"
      
dbPass "dbuserpassword"
    


Ensure that dbDriver, dbHostname, dbDatabase, dbUser and dbPass are filled out with the informations matching your database.

Save the file and try to access your installation again. I'm not sure if AdoDb needs the port configured or if it finds the database itself.
Reply
#5
(11-24-2012, 10:36 PM)Daniel Wrote: Hi,

Di you verified that the user admin has access to the database? I would suggest setting up a separate user for the database and grant him the rights to the database only.

To change the settings go to the directory conf within your LetoDMS installation and find settings.xml. In there, find the database section.

PHP Code:
<database
      ADOdbPath 
"adodbpath"
      
dbDriver "mysql"
      
dbHostname "localhost"
      
dbDatabase "nameofdatabase"
      
dbUser "dbuser"
      
dbPass "dbuserpassword"
    


Ensure that dbDriver, dbHostname, dbDatabase, dbUser and dbPass are filled out with the informations matching your database.

Save the file and try to access your installation again. I'm not sure if AdoDb needs the port configured or if it finds the database itself.

Something weird is happening here!
First of all I tried the check.php and the results are:

LetoDMS 2.0.2 check configuration (check version : 2.02-04)
Check Apache configuration
Apache version: Apache/2.2.22 (Win32) PHP/5.4.3
mod_rewrite : Ok
Check PHP configuration
PHP version: 5.4.3
gd2 : Ok
mbstring : Ok
database - mysql - : Ok
ldap (optional) : Error
Check LetoDMS configuration
settings->_rootDir : Ok
settings->_httpRoot : Ok
settings->_contentDir : Ok
settings->_ADOdbPath : Ok
database : Error
Access denied for user 'leto'@'localhost' (using password: YES)
Check other configuration
Cookies : OK
Informations
Limit size for uploading file (upload_max_filesize): 2M
Limit size for uploading file (post_max_size): 8M
SMTP server (SMTP): localhost
Limits of the execution time (max_execution_time): 30 s
END

Then I configured the settings.xml as u told me but I cannot login using
dbUser = "admin"
dbPass = "admin"
or
dbUser = "leto"
dbPass = "leto"

where leto is another user of letodms database (I can see this user in tblusers using phpadmin).

With both credentials I get the following mysql.log

121126 16:19:31 [Note] Plugin 'FEDERATED' is disabled.
121126 16:19:31 InnoDB: The InnoDB memory heap is disabled
121126 16:19:31 InnoDB: Mutexes and rw_locks use Windows interlocked functions
121126 16:19:31 InnoDB: Compressed tables use zlib 1.2.3
121126 16:19:31 InnoDB: Initializing buffer pool, size = 128.0M
121126 16:19:31 InnoDB: Completed initialization of buffer pool
121126 16:19:31 InnoDB: highest supported file format is Barracuda.
121126 16:19:31 InnoDB: Waiting for the background threads to start
121126 16:19:32 InnoDB: 1.1.8 started; log sequence number 1595685
121126 16:19:32 [Note] Server hostname (bind-address): '(null)'; port: 3308
121126 16:19:32 [Note] - '(null)' resolves to '0.0.0.0';
121126 16:19:32 [Note] Server socket created on IP: '0.0.0.0'.
121126 16:19:32 [Warning] Found invalid password for user: 'admin@localhost'; Ignoring user
121126 16:19:32 [Note] Event Scheduler: Loaded 0 events
121126 16:19:32 [Note] wampmysqld: ready for connections.
Version: '5.5.24-log' socket: '' port: 3308 MySQL Community Server (GPL)
121126 16:54:27 [Warning] Found invalid password for user: 'admin@localhost'; Ignoring user


And lastly from mysql console when I write GRANT ALL ON tblusers.* TO leto@localhost; then it says query Ok, but if I do the same for admin I get error 1133 (42000): Can't find any matching row in the user table.

I see the admin user.. but something is wrong with him!!

Any help is really helpful, as this is my first attempt with PHP and MySql.

Thank you

Reply
#6
As far as i'm aware, WAMP comes with MySQL server which has no password. To get rid of the message "Ignorning user" log in to PHPMyAdmin using your Admin user and set a password for this user.

Then go to your LetoDMS table and find the Privileges tab. Check there what rights are given to your leto user. If your user is not listed here, the user has no rights on the database.

But if you say that there is no matching row it seems that your Leto user is not existing, so you have to create it first. You can that directly in the Privileges tab by selecting "New" and providing the requested information into the fields. As host i would suggest to use "Local" (you will find it in the dropdown menu).

You can grant the user all rights to your LetoDMS database. If you are going to use another password update your settings.xml file accordingly.

If it still doesn't work please try to provide some screenshots, it will make the thing easier to check.

Daniel

Reply


Forum Jump:


Users browsing this thread: