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.

Outlook 2013 Search Folders – How to filter by folder

Just a short note to hopefully help others:

If you are creating a “Search Folder” in Outlook, and are using custom criteria, and one of them is “In Folder” with the condition “Does not Contain”, you must list all your keywords in a single criterion.

For example, I have a Search Folder called “Weekly Threads” to help me review the email activity from the week when writing my weekly report.

Outlook 2013 pop-up to Customize the Search Folder
Outlook 2013 pop-up to Customize the Search Folder

On the advanced tab, you can add the filter expressions you want. I don’t want to see anything from my Junk or Deleted Items folders, and I was struggling to get my Search Folder to work.

I stumbled across this article, which describes how to use Search Folders, within which was a description on how the author of that article filtered out mail from multiple folders.

Until now, I hadn’t been able to get it to work, and resorted to filtering out by sender. Now, I have the answer! You must put all the folder search terms into one, single search criterion for the filter to work.

Like this:

Outlook 2013 pop-up to enter advanced Search Criteria
Outlook 2013 pop-up to enter advanced Search Criteria

I find it strange, or at best non-intuitive that you while you can use multiple criteria for things like “From”, you must use only one criterion for the “In Folder” field. But, it works, so on to the next thing!


Grandfather tech support

After a bit of a marathon effort, I have finally restored my Grandfather’s email system to a working state.  What a mess!

First thing I battled with was a corrupted PST file.  scanpst.exe is a little hidden gem that helped with that.

Then, after someone “helped” 1, and messed up the mail delivery, I had to fix his outlook profile. Trouble was, I could not find the “show profiles” tab in the mail control applet. This was maddening, because it was turning up nothing in my Googling.

Turns out that somehow, outlook had been switched into “Internet Mail Only” mode, and I suppose this somehow removes the profile editing stuff. However, the profile that was left was so broken that it had to be fixed. 10 GOTO 10.

Lukily, I found this link which informed me about IMO mode, and how to switch it back.  So a lesson for everyone is that in order to use profiles in Outlook, which you need in order to have multiple PST datafiles, and to control how and where mail is delivered, your Outlook must be in Corporate Workgroup mode.

May I also add that TeamViewer is a very good remote control solution, which I used to great effect today for about 3 hours, including 2 reboots.

[1] By “helped” I mean completely screw everything up.

My brain is smarter than me

So I’ve been using a European keyboard for the last 12 months or so, except because I’m stubborn, I’ve not switched to the European keyboard layout in Windows.  Which means the markings on the key tops are all wrong.  Luckily I’m a good enough typist that this isn’t a problem.

Except the ellipses.

On the US keyboard, the left and right ellipse is above the 9 and 0 key, respectively.

On the European keyboard, they are above the 8 and 9 key, respectively.

This causes me pauses everytime I go to use them, and eventually, I have become so confused, that I get it wrong.  Every.  Time.

It’s actually kinda funny how my brain works though, because it has started to slowly get used to the idea that for a left elipse I need to press the key marked with the right ellipse, and for a right ellipse I need to press the key marked with an equals sign (as far as the superscript marking on the key that is.)

This is where it gets interesting though, is when I go to use the blackberry.  That one-key-to-the-right bias carries over, and when I try to type a left and right ellipse on the BB I get a right ellipse and a dash.

Stupid brain =)

What the hell is Explorer doing?

It is 2010, and yet when I browse a shared drive over the WAN, explorer slows down to a crawl reminiscent of the days when we were trying to FTP things over a 2400 SLIP connection.

Seriously, what is Explorer doing that it takes a full minute to retreive a directory listing of 16 objects?  And why must it completely take over the whole computer while it’s doing it?

Worse still is if you are browsing a very large directory listing, and try to scroll.  Then it hangs again, and this time, stops painting, so you get a big white square on the screen.  And then the Start menu stops responding.  And then you can’t Alt-Tab to other processes.

“Oh, well it’s retrieving information about all the files in the directory.”

No.  Because when I click on the file, I have to wait another 30 seconds for the context menu to appear.

“It negotiating security priveledges.”

Uh-huh.  We are all in the same domain, and I am several levels deep into the directory structure.

Does anyone know how I can browse file-shares over the WAN in this lifetime?

DIY router upgrade (aka IT department workaround)

Lifehacker – Hack Attack: Turn your $60 router into a $600 router – DIY.

Funny, I had this draft post hanging around for a while, and then I came across this exact router configuration at work.  Turns out it was easier, faster and cheaper to buy 2 routers, flash the new firmware, and set up a point-to-point wireless connection into the staging area than it was to rely on the company’s IT department to do it.

They wanted to charge thousands of euros for a similar solution.  Thousands.   Seriously, the staging area is in the next room.

The IT department is actually outsourced to another company owned by the same parent company.  They offer shit service at a high price, and using them is mandatory.  I can’t say their name, but I say that it rhymes with this: