PSA: Empty mysql root password for Ubuntu 16.04 LTS

Today, I was trying out the new release, and then I ran into a wall: logging in to mysql didn’t work, even though I was sure that I’d configured it correctly; i.e. root with an empty password.

I’d done this hundreds of times already, so I was sure it’d work, but then again, it just didn’t. So I tried to reset the root password by killing mysql and then starting mysql_safe with a new password. In the past, this process has worked successfully, but then I kept getting the message that mysql_safe has ended; i.e. not good.

I left things as-is for awhile, before thinking to read the manual (RTM):-

Password behaviour when the MySQL root password is empty has changed. Packaging now enables socket authentication when the MySQL root password is empty. This means that a non-root user can’t log in as the MySQL root user with an empty password. For details, see the NEWS file.

Tldr: Non-root *nix users can no longer login as MySQL root, so just use sudo root.

p.s. Sudo is not the answer to everything. The trick here is knowing why: an upstream change.

Previously I wrote about configuring a Microtik for RDP. Well, that router died, so I’d to do it all over again. (Here are the Terminal commands, except I’ve changed my public IP address to x.x.x.x.):-

/ip firewall nat>> add chain=dstnat action=dst-nat to-addresses= to-ports=3389 protocol=tcp dst-address=x.x.x.x dst-port=3389 log=no log-prefix=""
/ip firewall nat>> add chain=srcnat action=src-nat to-addresses= to-ports=3389 protocol=tcp dst-address= dst-port=3389 log=no log-prefix=""

Microtik port forwarding

Spent too much time configuring port forwarding (RDP) on my (Microtik) RouterBoard 751G-2HnD. The solution, as usual, was buried in a May 2014 forum post. There needs to be TWO (2) NAT rules enabled; i.e. to forward traffic to/fro the router/server.

In this case, and refers to the router’s WAN and LAN IPs respectively, and is the intended recipient of my RDP traffic.

[admin@751g2hnd] > /ip firewall nat print
1 chain=dstnat action=dst-nat to-addresses= to-ports=3389 protocol=tcp dst-address= dst-port=3389 log=no log-prefix=””

2 chain=srcnat action=src-nat to-addresses= to-ports=3389 protocol=tcp dst-address= dst-port=3389 log=no log-prefix=””

Many thanks to The Digital Doctor (!!

InnoDB transactions

Yesterday I updated the date column of an entire table meant for its subset only. The solution to this mistake was to recover from daily mysqldump, and filling in the gaps that were, thankfully, able to be filled in.

Writing in 2010, the author of the answer said:-

When something goes wrong, the only restoration option available is to reconstruct the data from a backup (providing one exists).

Here are two answers that I found useful; i.e., Stack Overflow, the gift(s) that keeps on giving:

Windows 10 and Google Drive

So I was asking my colleague to switch from Dropbox to Google Drive, mainly because is the company is subscribed to Google Apps for Work. But the pushback was that (Windows 10) search didn’t return hits as expected, and search is all-important.

I asked (the search engine) Google for help, and buried in a 2015 forum post is the solution for Windows 10, today. I’m not even sure why it’s been months and not resolved by the principals, but anyways:-

Right click ‘Google Drive’ > Security tab > Advanced > Click your username > Check the ‘Enable inheritance’ box > Click OK.!topic/drive/5EPuLuwmLGI

Hyper-V: Slow Guest Network Performance

A couple weeks ago, I discovered that guest network performance was abysmally slow, copy-pasting files from host to guest (RDP) felt like it took days instead of the (expected) minutes! This delayed the commissioning of a new application, and it bugged me for a bit. Later on, a different guest exhibited the same issue; i.e., I could actually see the images it sent over being (very slowly) downloaded in the browser…

After a bit of Google-ing and experimentation, it appears to be related to a NIC issue (our HP server uses Broadcom) and this Virtual Machine Queues (VMQ) option in Windows Server 2012 R2. It’s weird that it hasn’t already been resolved by Broadcom/Microsoft, but here’s the full Reddit link if you need more details.

Do note however that I tried out the Registry update (BelowTenGigVmqEnabled=1), but it didn’t work in my case. I’m just going to quote from the the Redditor in closing:-

My world is beautiful.