Skip to content

Instantly share code, notes, and snippets.

@richaber
richaber / README.md
Created January 27, 2023 17:24
Connect PhpStorm to Local “Lightning” MySQL database via TCP/IP

PhpStorm does not support connecting to MySQL via socket.

To connect via TCP/IP instead, you will need to allow the DB_USER to connect to MySQL over TCP/IP, for each site that you want to connect to.

You will need the DB_USER, DB_PASSWORD, and DB_NAME values from you WP-Config, for each site you want to connect to.

Right-click on a site you want to connect to in Local’s sidebar and choose “Open Site Shell.”

In the resulting terminal, run the following commands
Be sure to replace DB_USER and DB_PASSWORD in these commands with their values from WP-Config!:

@dlqqq
dlqqq / ryzen_bug.md
Last active October 23, 2025 21:52 — forked from wmealing/C-states.md
AMD Ryzen "Freezing" Bug on GNU/Linux Systems

Random "Freezing" with AMD Ryzen CPUs

It seems that numerous GNU/Linux users (including myself) have been having issues with the system randomly "freezing" during light usage. From journalctl output and anecdotal accounts, it is speculated that the AMD Ryzen CPUs do not support other C-states for power management very well (at least on GNU/Linux distributions), and the freezing may be resolved by limiting the C-state of the CPU.

Possible Solution

Limiting the C-state of the CPU can be done through the addition of the following kernel boot parameter.

processor.max_cstate=1