手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

ubuntu下使用apt-get安装mysql

时间:2024-10-14 03:53:33

1、首先执行sudo apt-get update。

ubuntu下使用apt-get安装mysql

2、然后执行sudo apt-get install mysql-server开始安装mysql。

ubuntu下使用apt-get安装mysql

3、安装过程中会出现一个界面提示输入root用户的密码,这里输入123456。

ubuntu下使用apt-get安装mysql

4、一会又出来一个界面,提示再次输入root用户的密码,再次输入123456。

ubuntu下使用apt-get安装mysql

5、等待一会就安装完成了,输入mysql -u root -p后回车,进行连接。

ubuntu下使用apt-get安装mysql

6、输入密码123456后就进入了下面的界面,说明Mysql安装成功。

ubuntu下使用apt-get安装mysql

7、执行几个常用的命令试试吧。show databases;展示数据库列表。

ubuntu下使用apt-get安装mysql

8、use mysql;切换到mysql数据库。show tables;展示mysql数据库下面的表。

ubuntu下使用apt-get安装mysql

9、select * from user\G;查询user表中的数据。

ubuntu下使用apt-get安装mysql
© 手抄报圈