MySQL Databases

Some MySQL handy oneliners:

SELECT User, Host, Password FROM mysql.user; CREATE USER newuser@localhost IDENTIFIED BY 'superstrongpassword'; CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER DATABASE mydatabase CHARACTER SET = utf8 COLLATE = utf8_general_ci; GRANT ALL PRIVILEGES ON mydatabase.* TO newuser@localhost; FLUSH PRIVILEGES;
 * List all users from running instance:
 * Create new user called
 * Create new UTF-8 database called  (at time of writing, 20190214, these settings seem to be the best practice for UTF-8 settings, YMMV, update if needed)
 * Change the encoding of  (because some software may not support latest best practices, etc)
 * Give full control of  to existing