Ubuntu install MySQL and some questions

Using apt to install MySQL will occur some question, first it is forgetting the database password by this way, or you could meet Access Deny because you not use sudo

So I will get you some tips to resolve this question.

  1. use sudo apt install mysql-server in terminal
  2. use sudo mysql -uroot -p in terminal
  3. use ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; in MySQL

now you can use mysql -uroot -p connect mysql-server and enjoy it.

上一篇:js数组方法forEach,map,filter,every,some实现


下一篇:Identifying Some Common Fallacies