前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >deepin v20如何安装mysql

deepin v20如何安装mysql

原创
作者头像
用户8965210
修改2021-09-02 09:37:51
8780
修改2021-09-02 09:37:51
举报
文章被收录于专栏:运维技术分享运维技术分享

deepin v20 换源和安装mysql

由于deepin v20不能直接安装mysql所以先进行换源,更换成阿里源,这样以后速度可以更快

修改文件 sudo vim /etc/apt/sources.list

代码语言:javascript
复制
#删除内容,并添加以下内容:

## Generated by deepin-installer

deb [by-hash=force] https://mirrors.aliyun.com/deepin/ panda main contrib non-free
代码语言:javascript
复制
执行sudo apt-get update
执行sudo apt-get upgrade命令。

安装mysql

执行安装mysql的语句

代码语言:javascript
复制
sudo apt-get install mysql-server mysql-client

获取到了登陆mysql的账户密码

代码语言:javascript
复制
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>

之后依次进入mysql数据库,修改root密码,刷新缓存。之后就可以exit退出使用root账户登录了:

代码语言:javascript
复制
use mysql;
update user set plugin="mysql_native_password",authentication_string=password('新密码') where user="root";
FLUSH PRIVILEGES;

使用修改后的帐号密码登陆

代码语言:javascript
复制
mysql -uroot -p000000

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档