MariaDB/MySQL
Jump to navigation
Jump to search
MariaDB is an open source fork of MySQL. There are some differences but most are internal, for users the commands and SQL syntax is exactly the same.
phpMyAdmin is a web based GUI for the maintenance of MariaDB and MySQL servers.
Move users from one server to another
Starting on the source server execute following commands
mysql -B -N -uroot -p -e "SELECT CONCAT('\'', user,'\'@\'', host, '\'') FROM user WHERE user IN ('username1', 'username2', 'username3')" > users.txt
while read line
do
mysql -B -N -uroot -p -e "SHOW GRANTS FOR $line"
done < users.txt > users.sql
sed -i 's/$/;/' users.sql
# Move the file to the other server and there do
mysql -u root -p < users.sql