1.Install MySQL
Unbuntu has provided a convenient way to install MySQL,you just need to scan lower command in the terminal,the unbuntu will help you install MySQL automaticly.
sudo apt install mysql-client-core-5.7
sudo apt install mariadb-client-core-10.1
sudo apt-get install mysql-server
When you install mysql,system may remind you set initial password,or may not.If in the install processing,it remind you set the password,you just need to set and remeber you password,then you can jump to step2.If you are unlucky like me,you should to change you password in the lower way.
sudo cat /etc/mysql/debian.cnf

As can be see,you My password is : pV3OLBUQffd5ClSO,and then scan lower command in your terminnal,but you should change the "user" and the "password",in the lower command, -u means user,-p means password.and then you can enter you mysql.
mysql -u debian-sys-maint -ppV3OLBUQffd5ClSO

Now you need to change your password and remenber it,for this,lower commands will help you.INn this place my new username is "root" and my password is "root" also.
use mysql;
//here is you new user name and password
update mysql.user set authentication_string=password('root') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
quit;
Now,you can restart the mysql and login use your new username and password.
sudo service mysql restart
mysql -u root -proot
2.Install mysql-workbench
mysql-workbench is a a nice graphical interface of MySQL in ubuntu,and it's installing method is also easy,after you install mysql-workbench,you will surprise the convenience to use.
sudo apt-get install mysql-workbench
本文介绍如何在Ubuntu系统上安装MySQL数据库及图形界面管理工具mysql-workbench。包括使用命令行安装MySQL客户端和服务端,设置初始密码,以及通过mysql-workbench进行图形化操作。
2336

被折叠的 条评论
为什么被折叠?



