Articles tagged with: mysql

Install MySQL Community Server on CentOS 8
Install MySQL Community Server on CentOS 8
Published Jan 14, 20205 min read0 comments
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
Published May 25, 20201 min read0 comments
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 →
Copyright © 2017-2023   Mark Brody | Blog