Skip to content

Instantly share code, notes, and snippets.

@cworks
Created December 24, 2015 04:11
Show Gist options
  • Save cworks/f83c902112b97008bb68 to your computer and use it in GitHub Desktop.
Save cworks/f83c902112b97008bb68 to your computer and use it in GitHub Desktop.
Things to do after a mysql install
USE mysql;
UPDATE user SET Password = PASSWORD('your-root-password')
WHERE User = 'root';
FLUSH PRIVILEGES;
# remove anonymous user
DELETE FROM user
WHERE User = '';
# drop unsecured test database
DROP DATABASE IF EXISTS test;
# create a master user
CREATE USER 'your-master-user'@'localhost' IDENTIFIED BY 'your-master-user-password';
GRANT ALL PRIVILEGES ON *.* TO 'your-master-user'@'localhost' WITH GRANT OPTION;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment