Articles tagged with: mysql
Install MySQL Community Server on CentOS 8
CentOS distributes MariaDB 10.3, a drop-in replacement for MySQL Server 5.7. If
you require MySQL 8, there are a few new steps on CentOS 8 that differ from past
versions.
All steps should be performed as the root user.
bash
sudo su
Code snippets that start with a # prompt contain sample output and should not be
copied verbatim.
Start by downloading the GPG key and saving it in /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
bash
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql…
Read More →
How to recurse parent IDs in a self-referencing table
WITH RECURSIVE cte AS (
SELECT id, name, parent_id, CONCAT(" > ", name) tree
FROM products
WHERE parent_id = 0
UNION ALL
SELECT p.id, p.name, p.parent_id, CONCAT(c.tree, " > ", p.name)
FROM products p
INNER JOIN cte c ON c.id = p.parent_id
SELECT * FROM cte where
…
Read More →