vito/resources/views/ssh/services/database/mysql/get-users-list.blade.php
Saeed Vaziry 0f06d81aac
Add database and database users sync (#537)
* Add database and database users sync

* get mysl users

* add mariadb and postgres

* fix phpstan
2025-03-12 22:59:25 +01:00

10 lines
313 B
PHP

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