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.
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
Execute sudo apt-get update
Execute sudo apt-get upgrade command.
1. Execute the statement to install mysql
sudo apt-get install mysql-server mysql-client
2. Check the accounts that can be logged in and check the password
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>
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;
5. Use the modified account password to log in
mysql -uroot -p000000
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!