deepin v20安装mysql

梦里梦外; 2022-12-13 15:28 325阅读 0赞

deepin v20 换源和安装mysql

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

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

    删除内容,并添加以下内容:

    Generated by deepin-installer

    deb [by-hash=force] https://mirrors.aliyun.com/deepin/ panda main contrib non-free

2.执行sudo apt-get update
3.执行sudo apt-get upgrade命令。

安装mysql

1.执行安装mysql的语句

  1. sudo apt-get install mysql-server mysql-client

2.查看可登陆账户并查看密码
在这里插入图片描述3.获取到了登陆mysql的账户密码

  1. lin@lin-PC:~$ mysql -udebian-sys-maint -pjSaNFiRzjlDAxiRN
  2. mysql: [Warning] Using a password on the command line interface can be insecure.
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id is 2
  5. Server version: 5.7.21-1 (Debian)
  6. Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  7. Oracle is a registered trademark of Oracle Corporation and/or its
  8. affiliates. Other names may be trademarks of their respective
  9. owners.
  10. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  11. mysql>

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

  1. use mysql;
  2. update user set plugin="mysql_native_password",authentication_string=password('新密码') where user="root";
  3. FLUSH PRIVILEGES;

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

  1. mysql -uroot -p000000

发表评论

表情:
评论列表 (有 0 条评论,325人围观)

还没有评论,来说两句吧...

相关阅读

    相关 deepin20体验

    现在Ubuntu20吊打deepin20 100条街。撑了20天受不了deepin 优点 开机启动设置简单,即使不是应用商店的应用也很好 deepin仓库不