Skip to content

Instantly share code, notes, and snippets.

@belachkar
Last active September 7, 2020 17:50
Show Gist options
  • Save belachkar/6a6b54ee8c79c3160bc3e71e6fb3b33f to your computer and use it in GitHub Desktop.
Save belachkar/6a6b54ee8c79c3160bc3e71e6fb3b33f to your computer and use it in GitHub Desktop.

MySQL Common Errors Fixations

Errors

2054 - The server requested authentication method unknown to the client

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

'password' must be changed to the wanted password.

Authentication Plugins

  • Native Pluggable: mysql_native_password.
  • Caching SHA-2 Pluggable:
    • sha256_password: Implements basic SHA-256 authentication.
    • caching_sha2_password: Implements SHA-256 authentication (like sha256_password), but uses caching on the server side for better performance and has additional features for wider applicability.

sleep doesn't work on Ubuntu 20.04 (WSL)

The error: sleep: cannot read realtime clock: Invalid argument.

The upcoming Ubuntu 20.04 implements glibc 2.31. Unless you are on Insider you have not gotten the fix for issue 4989 yet and likely will not for a couple months. Without the fix things tend to break on Ubuntu 20.04 on WSL 1, sometimes even in the upgrade process 9 to Ubuntu 20.04. For example htop doesn’t work on Ubuntu 20.04 on unpatched WSL 1.

The solution:

wget https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo dpkg --install libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo apt-mark hold libc6
sudo apt --fix-broken install
sudo apt full-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment