LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-22-2004, 05:09 AM   #1
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99

Rep: Reputation: 15
question on mysql user


hi all,

i got some question on mysql user account:

when i was installing mysql from srouce, i was recommanded by mysql documentation that i should create a user account named "mysql"

i issued this command"

shell>groupadd mysql
shell>useradd -g mysql mysql

but i got some error when tried login with this user account with mysql server:

I issued:

shell>mysql -u mysql -p
Enter password: (password)

ERROR 1045: Access denied for user: 'mysql@localhost' (Using password: YES)

note, i can login mysql server with root user....

** I have changed the mysql user account's password and also tried with this password..but same error appearing.

so,

Plz tell me:

1. Does linux system and mysql maintain different users? so, mysql's 'root' is something elses than linux's 'root' user?

2. If different, why the documentation says for creating "mysql" user? (I followed exact the command doc says to create new user..so its a system user)

3. how can i view (what the command) mysql server's user account ?

4. I m just wondering if i use:

mysql -u any_user_name -p
Enter password: (a blank password)

mysql> I can log in...

Any Idea

Last edited by sixth_sense; 04-22-2004 at 05:16 AM.
 
Old 04-22-2004, 05:17 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,553

Rep: Reputation: 139Reputation: 139
useradd
adds users to your system but not to mysql. u may log into mysql as root
and
grant usage on yourdb to yourname@localhost identified by 'passwd';

then u can at least log in as 'yourname'
take a look at the documentation of mysql grant command
grant all...
would allow the user a hole lot
cheers

Last edited by j-ray; 04-22-2004 at 05:20 AM.
 
Old 04-22-2004, 05:51 AM   #3
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99

Original Poster
Rep: Reputation: 15
thnx for the answer, any idea about point 4 ?
 
Old 04-22-2004, 05:57 AM   #4
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99

Original Poster
Rep: Reputation: 15
well, I just come to know consulting mysql reference manual that,

"Anyone who specifies a username for an account that has no password will be able to connect successfully to the server. "

- can i protect it anyway ??
 
Old 04-22-2004, 06:18 AM   #5
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
Unhappy

Quote:
Originally posted by sixth_sense
well, I just come to know consulting mysql reference manual that,

"Anyone who specifies a username for an account that has no password will be able to connect successfully to the server. "

- can i protect it anyway ??
I'm not sure what exactly you want. If you want to protect it, then either remove the passwordless account, or create a password for it.
 
Old 04-22-2004, 06:21 AM   #6
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254

Rep: Reputation: 30
you will find very cool documentation my mysql home page, also lot of tutorial online.

However if you want to you web base interface to mysql (all of your servers) then download webmin from www.webmin.com
webmin is very helpful for lot of tidious work to configure your servers including mysql manual.
it has web base inteface easy to follow and powerful, through this you could do anything you want.

enjoy webmin
 
Old 04-22-2004, 07:00 AM   #7
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99

Original Poster
Rep: Reputation: 15
ok, what i wanted to just protect anonymous user to log on mysql server.

Now...........what happening .......if "any_word_what_u_like" i use as user name with a blank password..i can log into mysql> prompt.

I got that it can be restricted by dropping anonymous user. but wanna know the command to accumplish this task.

thanks for "webmin" advice. but i need it later..just for now, i need command line.

Last edited by sixth_sense; 04-22-2004 at 07:03 AM.
 
Old 04-22-2004, 07:02 AM   #8
sixth_sense
Member
 
Registered: Mar 2004
Distribution: RedHat
Posts: 99

Original Poster
Rep: Reputation: 15
AS i started this topic, i should share my finishing...this is below what i did and working now, I actually consulted mysql documentation and removed anonymous accounts :





shell> mysql -u root mysql
mysql> DELETE FROM user WHERE User = '';
mysql> FLUSH PRIVILEGES;


Thanks all.



Last edited by sixth_sense; 04-22-2004 at 07:19 AM.
 
  


Reply


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
linux startup mysql as user question and backup questions... eyewittness Linux - Software 1 07-21-2005 01:26 PM
mysql user, help! chidomen Programming 2 01-14-2005 11:17 AM
mysql user huno Linux - Software 3 12-26-2003 04:21 PM
Postfix email user & linux user question. hct224 Linux - Newbie 0 11-30-2003 12:24 AM
libnss-mysql (Store your UNIX user accounts in MySQL) markus1982 Linux - Security 0 01-26-2003 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration