-
check my sql installation
mysql -V
-
login as root
mysql -u root -p
-
SELECT User FROM mysql.user;
- get list of the all database users -
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
- create new use with specified password -
GRANT ALL PRIVILEGES ON * . * TO 'aska'@'localhost';
- grant the all privileges -
vim /etc/mysql/my.cnf
- mysql config file -
sudo /etc/init.d/mysql restart
-
service mysql restart|start|stop|status
-
DROP USER 'aska'@'localhost';
https://help.ubuntu.com/12.04/serverguide/mysql.html
http://www.thegeekstuff.com/2008/07/howto-install-mysql-on-linux/
Last active
February 12, 2018 13:25
-
-
Save schaternik/56a896f6e048d9a3f1bc to your computer and use it in GitHub Desktop.
Mysql CLI
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment