Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-27-2008, 05:24 AM   #1
Registered: Sep 2008
Posts: 50

Rep: Reputation: 15
"Access denied" in MySQL server

Hello! I installed server MySQL (version 5.0) in Debian. Next I set up root password and added new user. Problem is that localy I can log only on root account ("mysql -u root -p"), however if I want to log on other account then I have information like this:
ERROR 1045 (28000): Access denied for user 'seprob'@'localhost' (using password: YES)
Additional is something strange; when I want to log remotely, after inscription of command "mysql -u root -h host", I'm logged without password. When I inscribe that same command with "-p" option, I can't go into the server (that same communique about error what above) on the root account and others. Any suggestions?
Old 10-27-2008, 09:31 AM   #2
Registered: May 2002
Location: Thorverton, Near Exeter, Devon, England
Distribution: Ubuntu 10.04 (used to be Red Hat 7.1, then Red Hat 9, then FC 2, FC 5, FC 6, FC 9 and Ubuntu 8.04)
Posts: 105

Rep: Reputation: 16
I have found that I have to give permission to users @localhost and @%:

GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword';
GRANT USAGE ON *.* TO 'myuser'@'localhost' IDENTIFIED BY 'mypassword';
Old 10-27-2008, 11:03 AM   #3
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 75

Rep: Reputation: 15
Apart from what hairysocks suggested, you may also need to execute
flush privileges;
after executing the grants.
Old 10-27-2008, 01:17 PM   #4
Registered: Sep 2008
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks a lot.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba + CUPS "Access denied, unable to connect" error lirik Linux - Networking 10 10-13-2011 02:09 PM
squid "access.log" access denied no user name jatender Linux - Server 1 10-02-2007 05:28 AM
I need to get rid of my old kbfx files to install new version - "access denied" Onewheelinweirdo Linux - Software 5 03-28-2007 09:04 AM
"Access Denied" to printer and directories shared via Samba Aarstar Linux - Networking 1 03-05-2002 07:38 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration