Add database and database users sync (#537)

* Add database and database users sync

* get mysl users

* add mariadb and postgres

* fix phpstan
This commit is contained in:
Saeed Vaziry
2025-03-12 22:59:25 +01:00
committed by GitHub
parent 493cbb0849
commit 0f06d81aac
17 changed files with 383 additions and 65 deletions

View File

@ -0,0 +1,9 @@
if ! sudo mysql -e "SELECT u.User,
u.Host,
(SELECT group_concat(distinct p.TABLE_SCHEMA)
FROM information_schema.SCHEMA_PRIVILEGES p
WHERE p.GRANTEE = concat('\'', u.User, '\'', '@', '\'', u.Host, '\'')) as Privileges
FROM mysql.user u;";
then
echo 'VITO_SSH_ERROR' && exit 1
fi