echo "select concat('show grants for ''',user,'''@''',host, ''';') from mysql.user where user <>'root'" |
mysql --host=$
hostname --user=$username --password=$password --port=$port -N |
mysql --host=$hostname --user=$username --password=$password --port=$port -N |
sed "s/$/;/" > create-users.sql