-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Database administrative login by Unix domain socket | |
| local all postgres peer | |
| # TYPE DATABASE USER ADDRESS METHOD | |
| # "local" is for Unix domain socket connections only | |
| local all all md5 | |
| # IPv4 local connections: | |
| host all all 127.0.0.1/32 md5 | |
| # IPv6 local connections: |
whatis- display one-line manual page descriptionswhatis -w 'ab*'- search using wildcardswhatis -r '^ab'- search using regexps
whereis- locate the binary, source, and manual page files for a commandwhereis -b vagrant- locate binarywhereis -m vagrant- locate man pageswhereis -s vagrant- locate source
NewerOlder