1. Install
In the input terminal
sudo apt-get install mysql-server mysql-client
Installation, the installation process if the password prompt pops up, you can install properly!
2, due to the password entry is not present, so I do not know how to enter data manipulation the command line
2.1, the default installation generated default account is found on the input terminal
sudo cat /etc/mysql/debian.cnf
As shown below account and password
2.2, mysql login account and password used to get
2.3, then it is to modify the password, but also with a little difference between the original
. 1 . 1 ), use mysql; # connect to mysql database 2 . 3 2 ), Update mysql. User SET authentication_string = password ( ' 123456 ' ) WHERE User = ' the root ' and the Host = ' localhost ' ; # Change Password 123456 is the password 4 . 5 . 3 ), Update User SET plugin = "mysql_native_password"; . 6 . 7 . 4 ), the flushprivileges ; . 8 . 9 . 5 ), quit; 10 . 11 see below FIG!
At last
Mysql login user name and password to use just set
mysql -uroot -p