deepin v20不能直接安装mysql所以先进行换源,更换成阿里源,这样以后速度可以更快,今天我们就来介绍一下deepin v20安装mysql的方法,有需要的可以参考一下。
deepin v20 换源和安装mysql由于deepin v20不能直接安装mysql所以先进行换源,更换成阿里源,这样以后速度可以更快
修改文件 sudo vim /etc/apt/sources.list
#删除内容,并添加以下内容:## generated by deepin-installerdeb [by-hash=force] https://mirrors.aliyun.com/deepin/ panda main contrib non-free
执行sudo apt-get update
执行sudo apt-get upgrade命令。
安装mysql1.执行安装mysql的语句
sudo apt-get install mysql-server mysql-client
2.查看可登陆账户并查看密码
3.获取到了登陆mysql的账户密码
lin@lin-pc:~$ mysql -udebian-sys-maint -pjsanfirzjldaxirnmysql: [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 2server 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 itsaffiliates. other names may be trademarks of their respectiveowners.type 'help;' or '\h' for help. type '\c' to clear the current input statement.mysql>
4.之后依次进入mysql数据库,修改root密码,刷新缓存。之后就可以exit退出使用root账户登录了:
use mysql;update user set plugin="mysql_native_password",authentication_string=password('新密码') where user="root";flush privileges;
5.使用修改后的帐号密码登陆
mysql -uroot -p000000
相关推荐:《mysql教程》
以上就是deepin v20如何安装mysql的详细内容。