LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2004, 10:19 PM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
mysqladmin localhost pass failed


Hi all

I've had a good break from Linux, but i'm back into it,

Can any one tell me why i get this error please, i've tried a number of different ways, and i've only ever got it right once.
I did get the first one ok.
Note: mysql is running


Using Tiny Sofa on CLI, any one give me some ideas please.

Code:
root@localhost ~# /usr/bin/mysqladmin -u root -h localhost password 'My_New_Pass'
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
root@localhost ~#
TT

Last edited by tommytomato; 08-12-2004 at 10:21 PM.
 
Old 08-12-2004, 10:58 PM   #2
tim1235
Member
 
Registered: Aug 2004
Location: Melbourne, Australia
Distribution: fc5/Gentoo
Posts: 57

Rep: Reputation: 15
/usr/bin/mysqladmin -u root -h localhost password 'My_New_Pass'

Try --password or just -p

te
 
Old 08-12-2004, 11:26 PM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Thanks

I've upgraded mysql using swup which upgraded perl and mysql ok

then i rebooted the system and MySQL daemon has started ok.

i can log into mysql ok using CLI
How ever if i type in mysqladmin it comes up.

then i try to change the localhost pass


Code:
/usr/bin/mysqladmin -u root -h localhost --password 'My_New_Pass'
comes up with Enter password:

I add my pass in and get the following error
Code:
/usr/bin/mysqladmin: Unknown command: 'My_New_Pass'
then i try the other one
Code:
/usr/bin/mysqladmin -u root -h localhost -p 'My_New_Pass'
comes up with Enter password:

I add my pass in and get the following error
Code:
/usr/bin/mysqladmin: Unknown command: 'My_New_Pass'
I read a fair bit about this and i haven't found how to fix

TT
 
Old 08-12-2004, 11:38 PM   #4
tim1235
Member
 
Registered: Aug 2004
Location: Melbourne, Australia
Distribution: fc5/Gentoo
Posts: 57

Rep: Reputation: 15
If there is no password initially you can just type:

/usr/bin/mysqladmin password newpass

te

Last edited by tim1235; 08-12-2004 at 11:39 PM.
 
Old 08-12-2004, 11:41 PM   #5
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
I get the error

Access denied for user: 'root@localhost' ( using password :NO)'

TT
 
Old 08-12-2004, 11:43 PM   #6
tim1235
Member
 
Registered: Aug 2004
Location: Melbourne, Australia
Distribution: fc5/Gentoo
Posts: 57

Rep: Reputation: 15
Try this

/usr/bin/mysqladmin -u root -p password newpass

You will prompted for you password and then it will be reset to newpass.

te
 
Old 08-13-2004, 12:02 AM   #7
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
thank you thank worked

Question does that set the localhost one as well ?

TT
 
Old 08-13-2004, 12:04 AM   #8
tim1235
Member
 
Registered: Aug 2004
Location: Melbourne, Australia
Distribution: fc5/Gentoo
Posts: 57

Rep: Reputation: 15
It defaults to the localhost.

If you need to specify another host then you can use the -h host option

i.e /usr/bin/mysqladmin -u root -h myhost -p password newpass

te
 
Old 08-13-2004, 09:59 PM   #9
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Thank you Tim

whats the best way to give myself access to mysql via local network including out side my network.

TT
 
Old 08-15-2004, 07:08 PM   #10
tim1235
Member
 
Registered: Aug 2004
Location: Melbourne, Australia
Distribution: fc5/Gentoo
Posts: 57

Rep: Reputation: 15
I usually just ssh or telnet into the machine running the mysql server and then log into mysql from there.

There are also GUI tools that you can use, one such tool is phpMyAdmin

te

Last edited by tim1235; 08-15-2004 at 07:19 PM.
 
  


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
mysqladmin file is missing? dtournas Linux - Software 1 01-16-2005 01:15 PM
Connection to LOCALHOST failed when I try to browse the LAN in Samba jeffcheng Linux - Networking 0 09-21-2004 06:55 AM
mysqladmin problem hrishikesh Linux - Software 1 07-08-2003 12:55 PM
mysqladmin vcheah Linux - Software 2 11-24-2002 03:41 PM
ping localhost failed squid.mib Linux - General 4 08-08-2002 01:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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