Skip to content

Instantly share code, notes, and snippets.

@ldong
Created February 21, 2017 06:53
Show Gist options
  • Save ldong/29bea2eb2bff270b0ebc0ec8310c7268 to your computer and use it in GitHub Desktop.
Save ldong/29bea2eb2bff270b0ebc0ec8310c7268 to your computer and use it in GitHub Desktop.
MySQL Notes

Add new user

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-14-04

Installation

sudo mysql_secure_installation sudo apt-get install mysql-server

MySQL

netstat -tln

sudo /etc/init.d/mysql restart sudo service mysql restart

sudo vim /etc/mysql/my.cnf

sudo mysql -u root -p SHOW GLOBAL VARIABLES LIKE 'PORT';

sudo ufw allow 3306/tcp sudo service ufw restart

Login

mysql -h 192.241.203.159 -u root -p Password: root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment