Recovering MySQL root password in MAMP

There are endless guides out there on how to do this. This is what I found:

Here is my answer:

# stop the MySQL server. Can also do this from MAMP control panel.
$> killall -9 mysql

# start MySQL server and request it to not load in permissions
$> /Applications/MAMP/Library/bin/mysql --skip-grant-tables &

# launch mysql client. No password will be required.
$> /Applications/MAMP/Library/bin/mysql

# now that you are connected to the server, request it to load permissions
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

# now reset the root password
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ’newpassword';

The key part of that last statement is the mysql_native_password part. All of the above linked solutions use this instead:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword’;

But this was failing for me, with the error:

ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'

The official documentation says that if this fails, try modifying the underlying table directly:

mysql> UPDATE mysql.user SET authentication_string = PASSWORD('newpassword')
    -> WHERE User = 'root';
Query OK, 0 rows affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 1

Warning (Code 1681): 'PASSWORD' is deprecated and will be removed in a future release.

Which, as you can see, didn’t work either. So there you are. This is what worked for me on MAMP v6.3, macOS Big Sur, MySql 5.7.32.

Automator Script to copy photos from iCloud PhotoStream into Lightoom


iCloud Photo Stream is limited to a copy of the last 1000 photos, and 30 days or something.
Camera roll is everything, unless you delete something.
Camera roll is backed up to the iCloud as part of the phone backup

Automatically import photo stream photos into Lightroom:
These instructions didn’t work for me, because the Filter Finder Items wasn’t returning all the images, only the last one

These instructions worked, and in case they go away, here they are:


This link talks about how to get a notification for the automator action, which I integrated into my recipe, which now looks like this:


BTW: I got this image from the automator package, which is located here:  /Users/jake/Library/Workflows/Applications/Folder Actions/

The upside-down text is weird. Here it is copy and pasted:

on run {input, parameters}
    repeat with i from 1 to the count of input
        set thisItem to item i of input
        set thisPath to the quoted form of the POSIX path of thisItem
        set thisFilename to (do shell script "basename " & thisPath)
        if i is 1 then
            set the nameString to thisFilename
            set the nameString to nameString & ", " & thisFilename
        end if
    end repeat
    return nameString
end run

Which results in this:

automator notifications

It would be cool to be able to include a thumbnail of the image in the notification…

I’ve been running this script for a while now, and it seems to be working nicely on Mavericks 10.9.5.

The next part will be configuring Lightroom to automatically import from that directory.

But what to do about Dropbox? Keep it as is, automatically importing photos?

And then what is the easiest way to get rid of photos from the Camera Roll?

Things I’ve learned on the Mac so far

I bought a 27 inch iMac last year, and I’ve been trying to get used to it ever since.

Here’s what I’ve figured out so far:

  • There is no “cut” feature in Finder, only “copy”. To get “cut” you must first “copy” and then when you are ready to “paste”, hold down the “option” key, and the “copy” turns into “move”.
  • Install XtraFinder. It adds the following features to Finder
    • Multiple Tabs
    • Options to arrange folders on top of files
    • “Copy Path”, “Show Hidden Items”, “Refresh”, “Copy to”, “Move to”, “New Terminal Here”, “Make Symbolic Link”, “Contents”, …
  • Install DoubleCommand to make the “home” and “end” buttons on the keyboard work properly. Be sure to uncheck the “Enter Key acts as Command Key” or else the Enter key on the numeric keyboard will appear to stop working.
  • To make the forward delete key work properly in the terminal, edit the current Terminal profile, go to Keyboard, and look for the forward delete symbol. If it’s not there, add a new mapping. Select “Send Text” as the action, and then press ⌃-⇧-D (Control-Shift-D) in the input box. it will record it is \004. You are now good to go.
  • Any keyboard shortcuts you’ve defined on your iPhone will sync to the Mac, assuming you’ve got iCloud enabled. Except that these shortcuts don’t work in Chrome because they’ve opted not to use the MacOS spell-check thingy.
  • The Solarized project has a great colour scheme, and they have the setting for the Mac Terminal program, which is nice.
  • I use PureText on Windows to paste from the clipboard in plain text. On the Mac, you can get the same effect by using ⌥-⌘-V (Option-Command-V).

(Handy page with Unicode HTML entities for Apple key caps)