Skip to content

Instantly share code, notes, and snippets.

@betojsx
Last active May 1, 2017 01:08
Show Gist options
  • Save betojsx/4751d9890741936b818541f567ad0dc2 to your computer and use it in GitHub Desktop.
Save betojsx/4751d9890741936b818541f567ad0dc2 to your computer and use it in GitHub Desktop.
# Instalação do MYSQL, Ubuntu 16.04
sudo apt-get install mysql-server
mysql -u root -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
FLUSH PRIVILEGES;
#CREATE A NEW DATABASE;
CREATE DATABASE 'database_name';
#import a .sql file to a database;
USE 'database_name';
mysql -u username -ppassword database_name < file.sql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment