Sensible Open Source

Blog Status

  • 4 yrs 48 wks 5 days old
  • Updated: 11 Mar 2010
  • 455 entries
  • 174 comments
Total: 1,213,250
since: 5 Apr 2005

LinkBlogS

Creating Vidcasts

18 June 2007, Monday 7:05 P GMT-06
Tags:      

Man, Can't Microsoft Catch A Break?

16 March 2007, Friday 12:26 P GMT-06

Viacom, Google andYou Tube, Oh My!

16 March 2007, Friday 12:25 P GMT-06

Switch to digital TV to start in October

16 March 2007, Friday 7:46 A GMT-06

Is the Ice Ready? No, Its Still To Hot To Use...

16 March 2007, Friday 7:43 A GMT-06

MIT Entire Curriculum At disposal of e-learners

6 March 2007, Tuesday 11:52 A GMT-06

A cure for e-mail attention disorder?

2 March 2007, Friday 12:51 A GMT-06
Tags:  

Windows-on-Mac software gets virtualization update

1 March 2007, Thursday 5:08 A GMT-06

EnterpriseDB is/n't Open Source

1 March 2007, Thursday 3:37 A GMT-06

BitTorrent download portal debuts

27 February 2007, Tuesday 9:05 A GMT-06

$45b TXU buyout

27 February 2007, Tuesday 9:02 A GMT-06

iPhone Competitors Got The Touch

26 February 2007, Monday 3:43 A GMT-06
Tags:        

HTC - Smart Mobility

25 February 2007, Sunday 4:22 A GMT-06

Hard to find 1-800 numbers

23 February 2007, Friday 8:35 A GMT-06

Cuba Embraces Open-Source Software

21 February 2007, Wednesday 3:10 A GMT-06

Vista at the tipping point, Err Dipping Point?

11 February 2007, Sunday 11:11 A GMT-06
Tags:  

PostgreSQL Open Source And Persistence

3 February 2007, Saturday 10:32 P GMT-06

Blackboard Pledges No Patent Blocks

3 February 2007, Saturday 10:28 P GMT-06

UVU

5 January 2007, Friday 11:58 P GMT-06

Open-source IP PBX software appliance"

4 January 2007, Thursday 3:44 A GMT-06

Asterisk an under-appreciated Open Source Success Story

4 January 2007, Thursday 3:43 A GMT-06

Open Source AJAX Tooling

4 January 2007, Thursday 3:41 A GMT-06

Google MAIL API Secuirty Alert

1 January 2007, Monday 7:37 P GMT-06
Tags:    

United States Patent Application: 0060288329

26 December 2006, Tuesday 4:00 A GMT-06

LinkBlog Popular Tags

                                       







««Mar 2010»»
SMTWTFS
  12
3
456
789
10
111213
14151617181920
21222324252627
28293031

 

August 16, 2012

Time Left

2 years 5 months 4 days

                   

RSS Add-Me








Google Related Links

MYSQL - Lost Password - No Sweat Until You Meet OS X

posted 23 September 2007, Sunday
OK, I changed the mysql admin password and forgot it. Can't blame anyone but me!!  Would like to blame Kirk just to see Alan laugh but I would have to wait until Decmeber and I can't wait that long.
 
Nonetheless, the instructions here I had a problem with in OSX. The first part is with the KILL PID instructions.  In OS X  The PID file is in HOSTNAME.pid which resides in /usr/local/mysql/data/.  In my case the kill command is `kill `cat /usr/local/mysql/data/127.0.0.1.pid` or '/usr/local/mysql/data/COMPUTERNAME.pid` .  Interestingly enough I got a no such pid.  So I sudo'd the command and same problem..
 
Then I had an issue with ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2.  Of course, this is solved quickly creating a my.cnf file in /etc to configure mysql.  OS X has a nasty habit of defaulting itself and not using this fileand letting the admin decide to handle this configuration if desired.  
 
The configuration if you care to see one format is below:

 

MySQL  /etc for "my.cnf" file.

EXMAPLE: /usr/local/mysql/supportfiles/my-large.cnf

If you want control than create the file "my.cnf" and copy it inside the /etc folder.

An example of MySQL Client, Server and other Configuration is below:

[mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
baserdir=/usr/local/mysql

[client]
socket=/var/lib/mysql/mysql.sock

 

Invocation is a simple shutdown and restart fo the server. 

 
 
Confused I ran off to find a different solution.  
 
And I actually found a quicker solution:
 
Since this failed .... KILL the process with the PID number in  /usr/local/mysql/data/127.0.0.1.pid OR '/usr/local/mysql/data/COMPUTERNAME.pid`
 
I resulted in identifying the number and killed the process as seen below:
 
# sudo kill 1234 
 
# sudo /usr/local/mysql/bin/mysqld --skip-grant-tables --user=root
mysql> UPDATE user SET Password=PASSWORD('your_new_password') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
 
Kill server and restart 

# mysql -u root -p
Enter password: your_new_password

And thats it..  This works on Windows and LINUX so its a revamp of my August entry.
 
If you find out what the deal is with the access denied on this command `kill `cat /usr/local/mysql/data/127.0.0.1.pid` OR '/usr/local/mysql/data/COMPUTERNAME.pid` send me a clue... as I am clueless why this does not work. 
 
Im thinking its directory permissions and will look into my laptop as I kill the mysql server with a kill cat command.. something is just not right...  
 
Any thoughts would be welcome? 
 
 

tags:        

links: digg this    del.icio.us    technorati    reddit




1. Ben left...
24 September 2007, Monday 5:23 pm :: http://pacificaglobal.com

Your mysql daemon is probably running on a different user account; the failsafe way to shut it down this way would be to run that command as root. You could also just use 'killall,' which takes the process name instead, making life a bit easier on you, but that's only safe if you only have the one instance of mysql running, which is probably the case.


2. SOS left...
25 September 2007, Tuesday 3:00 am

Interesting... I launch the daemon as root and try to kill it as root. Have not tried to use KILLALL will do so in the morning. And yes one instance... Thank you for the insight!!