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

Notices


Reply
  Search this Thread
Old 10-27-2008, 04:24 AM   #1
seprob
Member
 
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, 08:31 AM   #2
hairysocks
Member
 
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, 10:03 AM   #3
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 75

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

Original Poster
Rep: Reputation: 15
Thanks a lot.
 
  


Reply



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 01:09 PM
squid "access.log" access denied no user name jatender Linux - Server 1 10-02-2007 04: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 08:04 AM
"Access Denied" to printer and directories shared via Samba Aarstar Linux - Networking 1 03-05-2002 06:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:09 AM.

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