Home > Database > Mysql Tutorial > How to install mysql in deepin v20

How to install mysql in deepin v20

醉折花枝作酒筹
Release: 2021-07-08 09:22:54
forward
2505 people have browsed it

deepin v20 cannot directly install mysql, so change the source first to Alibaba source, so that it can be faster in the future. Today we will introduce how to install mysql in deepin v20. You can refer to it if you need it.

How to install mysql in deepin v20

#deepin v20 source change and mysql installation

Because deepin v20 cannot directly install mysql, so change the source first and replace it with Alibaba source, so that the speed can be improved in the future Faster

Modify the file sudo vim /etc/apt/sources.list

#删除内容,并添加以下内容:
## Generated by deepin-installer
deb [by-hash=force] https://mirrors.aliyun.com/deepin/ panda main contrib non-free
Copy after login

Execute sudo apt-get update

Execute sudo apt-get upgrade command.

Install mysql

1. Execute the statement to install mysql

sudo apt-get install mysql-server mysql-client
Copy after login

2. Check the accounts that can be logged in and check the password

How to install mysql in deepin v20

3. Obtain the account password for logging in to mysql

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>
Copy after login

4. Then enter the mysql database in sequence, change the root password, and refresh the cache. After that, you can exit and log in using the root account:

use mysql;
update user set plugin="mysql_native_password",authentication_string=password('新密码') where user="root";
FLUSH PRIVILEGES;
Copy after login

5. Use the modified account password to log in

mysql -uroot -p000000
Copy after login

Related recommendations: "mysql tutorial"

The above is the detailed content of How to install mysql in deepin v20. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template