当前位置:网站首页>05 Ubuntu installing mysql8
05 Ubuntu installing mysql8
2022-06-24 08:25:00 【weixin_ forty-six million three hundred and seventy-one thousan】
One : download MySQL APT Install configuration package
wget https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb
Two : install MySQL
1、 Enter the following command , Enter the installation :
sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb
2、 Up and down key selection ok , enter
install MySQL Server
1、 to update apt Software sources
sudo apt-get update
2、 install mysql Server
sudo apt-get install mysql-server
2.1、 I made a mistake :
W: GPG error :http://repo.mysql.com/apt/ubuntu bionic InRelease: Because there is no public key , The following signature could not be verified : NO_PUBKEY 467B942D3A79BD29
E: Warehouse “http://repo.mysql.com/apt/ubuntu bionic InRelease” There is no digital signature .
N: Cannot safely update with this source , So the source is disabled by default .
N: See apt-secure(8) Manual for details of warehouse creation and user configuration .
2.2、 resolvent :
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
# The following string : yes W:GPG Error reported NO_PUBKEY 467B942D3A79BD29
2.3、 Re install mysql server : sudo apt-get install mysql-server
3、 The following , It means that we are not installing mysql8 Version of , Installation is mysql 5.7.38【 If you don't want to use it MySQL5.7 edition , Skip to step 5】
Setting up mysql-server (5.7.38-0ubuntu0.18.04.1) ...
Processing for libc-bin (2.27-3ubuntu1.5) The trigger of ...
Processing for systemd (237-3ubuntu10.52) The trigger of ...
Processing for man-db (2.8.3-2ubuntu0.1) The trigger of ...
Processing for ureadahead (0.100.0-21) The trigger of ...
4、 I want to enter MySQL in ; After the installation is successful, the random password , Need to change password .
see MySQL edition :mysql -V
Get into MySQL client :mysql -uroot -p
Report errors :ERROR 1698 (28000): Access denied for user 'root'@'localhost'
4 Solutions to reporting errors , Because the random password is generated , Need to change password .
4.1、 Go to configuration file , Set login without password
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
To [mysqld] Next Join in :skip-grant-tables
Save and exit :wq
restart mysql service :service mysql restart
4.2、 Get into MySQL, Set the password
1、 Get into MySQL client
mysql -uroot -p
No password required , Directly enter
2、 perform
use mysql;
update user set authentication_string=password("[email protected]"),plugin='mysql_native_password' where user='root';
flush privilegs;
3、 modify mysql The configuration file , Delete the sentence without entering the password .
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
take [mysqld] Under the skip-grant-tables Comment or delete
4、 restart mysql
service mysql restart
4.3、 Re enter MySQL client
mysql -uroot [email protected]
Enter into MySQL after , Try creating a database
create database test_db;
5、 If you don't want mysql5.7.38, You need to uninstall , Install again mysql8 edition
5.1、 uninstall mysql5.7 edition
1、 see mysql The dependencies of :
dpkg --list|grep mysql
2、 uninstall
sudo apt-get remove mysql-common
3、 uninstall ( The last number depends on the version you downloaded , adopt mysql -V see )
sudo apt-get autoremove --purge mysql-server-5.7
Select delete existing database
4、 Clean up residual data
dpkg -l|grep ^rc|awk '{print$2}'|sudo xargs dpkg -P
5、 verification : Look at the dependencies again , None is displayed , Clean up
dpkg --list|grep mysql
If there are other contents, execute :sudo apt-get autoremove --purge mysql-apt-config
Again dpkg --list|grep mysql View dependencies
6、 install MyS5QL8.0
6.1、 download mysql package
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
6.2、 install
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
6.3、 Update software source
sudo apt update
6.4、 install MySQL8
sudo apt install mysql-server
6.5、 Set up root password , Through the down arrow , Select OK , enter
6.6、 See the default in the online tutorial mysql8.0 The encryption method is the same as ubuntu18.04 Are not compatible , So choose 5.x Encryption method of ; It is suggested to choose the one below :
choice (Retain MYSQL 5.x Compatibility) after , Click enter , perform
6.7、 See below , The installation is mysql8 了
Setting up mysql-server (8.0.29-1ubuntu18.04) ...
Processing for man-db (2.8.3-2ubuntu0.1) The trigger of ...
Processing for libc-bin (2.27-3ubuntu1.5) The trigger of ...
7、 Get into mysql The client validates
1、 see mysql edition
mysql -V
2、 Get into MySQl client
mysql -uroot [email protected]
边栏推荐
- WCF TCP protocol transmission
- Swift foundation features unique to swift
- 2022 mobile crane driver special operation certificate examination question bank and online simulation examination
- Solve the problem of notebook keyboard disabling failure
- 2021-03-11 COMP9021第八节课笔记
- Promise usage scenarios
- 3D数学基础[十七] 平方反比定理
- 对于flex:1的详细解释,flex:1
- [ACNOI2022]不是构造,胜似构造
- "Adobe international certification" about Adobe Photoshop, creating and modifying brush tutorials?
猜你喜欢

C language_ Love and hate between string and pointer

More than observation | Alibaba cloud observable suite officially released

Utilisation de la fermeture / bloc de base SWIFT (source)

The article takes you to understand the security of Windows operating system and protect your computer from infringement

Swift 基础 闭包/Block的使用(源码)

自动化测试的未来趋势

根据网络上的视频的m3u8文件通过ffmpeg进行合成视频

Shader common functions

jwt(json web token)

Swift Extension ChainLayout(UI的链式布局)(源码)
随机推荐
Saccadenet: use corner features to fine tune the two stage prediction frame | CVPR 2020
12--合并两个有序链表
pyQt 中 QMenu 响应
对于flex:1的详细解释,flex:1
Final review and key points of software process and project management
WCF TCP protocol transmission
【点云数据集介绍】
51 single chip microcomputer_ External interrupt and timer / Counter interrupt
2021-03-11 COMP9021第八节课笔记
Industrial computer anti cracking
Getting started with crawler to giving up 06: crawler play Fund (with code)
2022茶艺师(中级)上岗证题库及在线模拟考试
The article takes you to understand the security of Windows operating system and protect your computer from infringement
Promise的使用場景
Optimization and practice of Tencent cloud EMR for cloud native containerization based on yarn
LabVIEW查找n个元素数组中的质数
李白最经典的20首诗排行榜
直播回顾 | 云原生混部系统 Koordinator 架构详解(附完整PPT)
Transformers pretrainedtokenizer class
有关iframe锚点,锚点出现上下偏移,锚点出现页面显示问题.iframe的srcdoc问题