LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-31-2011, 09:44 PM   #1
LoneWolf69
Member
 
Registered: Jan 2011
Posts: 34

Rep: Reputation: 0
mysql on workstation


I have a new machine and want to start using mysql. I try to connect and cannot get in. I have not logged in yet so I am trying to reset the password in a terminal with...
sudo /etc/init.d/mysql reset-password

and it returns...
sudo: /etc/init.d/mysql: command not found

What is wrong here?

Thank you in advance.

Keith
 
Old 10-31-2011, 10:54 PM   #2
bryan641
Member
 
Registered: Mar 2011
Location: Ohio, USA
Distribution: Debian Stretch
Posts: 43

Rep: Reputation: 14
Keith,

The "mysql" in /etc/init.d is used to start the mysql daemon (and stop, reload and report the status of), not reset your password (or enter mysql commands or anything else).

Is the mysql daemon running?
Try '/etc/init.d/mysql status" to see.

If you need to reset your root mysql password, you'll need to stop the daemon, then run it stand-alone and issue an update command to reset the password. Instructions are here (assuming you've got mysql 5).

--Bryan
 
Old 11-01-2011, 04:29 AM   #3
linuxwin2
Member
 
Registered: Oct 2011
Posts: 44

Rep: Reputation: Disabled
What's your distribution Fedora, ubuntu ...?
If you haven't /etc/init.d/mysql you must install mysql-server.
 
Old 11-03-2011, 07:28 PM   #4
bryan641
Member
 
Registered: Mar 2011
Location: Ohio, USA
Distribution: Debian Stretch
Posts: 43

Rep: Reputation: 14
Quote:
Originally Posted by linuxwin2 View Post
What's your distribution Fedora, ubuntu ...?
If you haven't /etc/init.d/mysql you must install mysql-server.
Excellent point. Since it's returning "command not found" that's most likely the cause. Otherwise the response would be "Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status".

--Bryan
 
  


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
Windows workstation Samba error "not allowed to log on from this workstation" salscozzari Linux - Networking 0 01-02-2008 03:04 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 04:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
MySQL/PHP on workstation vijayind Linux - Newbie 4 07-01-2004 05:15 AM

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

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