本文摘自PHP中文网,作者醉折花枝作酒筹,侵删。
deepin v20不能直接安装mysql所以先进行换源,更换成阿里源,这样以后速度可以更快,今天我们就来介绍一下deepin v20安装mysql的方法,有需要的可以参考一下。
deepin v20 换源和安装mysql
由于deepin v20不能直接安装mysql所以先进行换源,更换成阿里源,这样以后速度可以更快
修改文件 sudo vim /etc/apt/sources.list
1 2 3 | #删除内容,并添加以下内容:
## Generated by deepin-installer
deb [by-hash=force] https:
|
执行sudo apt-get update
执行sudo apt-get upgrade命令。
安装mysql
1.执行安装mysql的语句
1 | sudo apt-get install mysql-server mysql-client
|
2.查看可登陆账户并查看密码

3.获取到了登陆mysql的账户密码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | lin@lin-PC:~$ mysql -udebian-sys-maint -pjSaNFiRzjlDAxiRN
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.21-1 (Debian)
Copyright (c) 2000, 2018, Oracle and / or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and / or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
|
4.之后依次进入mysql数据库,修改root密码,刷新缓存。之后就可以exit退出使用root账户登录了:
1 2 3 | use mysql;
update user set plugin= "mysql_native_password" ,authentication_string= password ( '新密码' ) where user = "root" ;
FLUSH PRIVILEGES ;
|
5.使用修改后的帐号密码登陆
相关推荐:《mysql教程》
以上就是deepin v20如何安装mysql的详细内容,更多文章请关注木庄网络博客!!
相关阅读 >>
mysql有没有json类型?
浅谈mysql的事务隔离
了解mysql中的外键作用
mysql安装图文详解
大三期末复习mysql
mysql、sqlserver、oracle三大数据库的区别
mysql建表外键怎么设?
实例详解mysql数据库的设计问题
mysql存储的字段是不区分大小写的,你知道吗?
mysql innodb的锁定机制实例详解
更多相关阅读请进入《deepin》频道 >>
机械工业出版社
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。
转载请注明出处:木庄网络博客 » deepin v20如何安装mysql