Skip to content

Instantly share code, notes, and snippets.

View hackmods's full-sized avatar
🏠
Working from home

Ryan Morris hackmods

🏠
Working from home
View GitHub Profile
@hackmods
hackmods / exportMysqlUsers.php
Last active December 14, 2020 15:29 — forked from janich/exportMysqlUsers.php
Export MySQL users and permissions
<?php
/**
* Export MySQL users and permissions
*
* This script exports raw CREATE USER and GRANT queries of a given database
* to help migrate MySQL users and permissions to a new server.
* Users will keep their passwords across the migration.
*
* Warning: The import queries expects exactly the same database structure!
*