LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-08-2004, 11:39 AM   #1
baby_linu
LQ Newbie
 
Registered: Feb 2004
Distribution: RH8, Fedora
Posts: 10

Rep: Reputation: 0
setting user password to mysql!!


hi
How can i Set User passwd in Mysql.I am very new to Mysql

I tried
GRANT ALL PRIVILEGES ON *.* TO user@localhost
IDENTIFIED BY 'password' WITH GRANT OPTION;

and

INSERT INTO user VALUES('localhost','user',PASSWORD('password'),
-> 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

The Query shows Successfull but when i am ligging to mysql as
mysql test -h sr2 -u user -p
Password:
ERROR 1045: Access Denied For User 'user@localhost' (using password=YES)



And I can login by just hitting enter on that password prompt

Help Me !! I am in trouble;

 
Old 03-08-2004, 11:46 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
mysqladmin -u <username> -p password <newpassword>

This will prompt you for the current password and change it to the <newpassword>. You don't need the <>, I just put them in so you know which things you need to change.
 
Old 03-08-2004, 12:11 PM   #3
baby_linu
LQ Newbie
 
Registered: Feb 2004
Distribution: RH8, Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
hi

Thank You fro your Valuable reply

The mysqladmin executed successfully but when i am loggong
mysql test -h sr2 -u user -p

again
ERROR 1045: Access Denied For User 'user@localhost' (using password=YES)

what is happening here??
 
Old 03-09-2004, 10:59 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Sounds like there is no database "test"

Last edited by Hko; 03-09-2004 at 11:01 AM.
 
  


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
MySQL 4.1 user/password problem devfreak Linux - Software 4 03-23-2006 01:54 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
Setting up mysql without user.frm?!?! silversky Slackware 1 02-04-2004 03:01 PM
How do I add a host user password to mysql server? cmisip Linux - Networking 3 12-16-2002 09:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:26 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