当前位置:网站首页>[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]
[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]
2022-07-31 05:52:00 【m0_67391401】
文章目录
前言
本文基于Ubuntu20.04 LST 以及MySQL 8.0.29,可视化工具使用mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb
安装步骤
1.安装MySQL
sudo apt-get update #Get the latest software sources
sudo apt-get install mysql-server #安装mysql
启动与关闭MySQL
service mysql start #启动MySQL
service mysql stop #关闭MySQL
2.配置MySQL
开始配置:
sudo mysql_secure_installation
...
# 1.Ask whether to install the password plugin,我选择 No
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
Press y|Y for Yes, any other key for No: n
# 2.为root用户设置密码
Please set the password for root here.
New password:
Re-enter new password:
#2.1 The solution is detailed in the next section,解决bug
... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.
# 2.2 解决bug后,重新设置密码
New password:
Re-enter new password:
#3.删除匿名用户,我选No
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : n
... skipping.
#4.禁止root管理员从远程登录,这里我选 No
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n
... skipping.
#5.删除test数据库并取消对它的访问权限, 我选 No
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : n
... skipping.
#6.刷新授权表,让初始化后的设定立即生效, 选 Yes
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
3.解决配置MySQL中的bug
解决报错Failed! Error: SET PASSWORD has no significance for user ‘root’@‘localhost’ as the authentication me
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';
Completed as shown below,You can repeat the operation of changing the password in the previous section
4.安装可视化工具MySQL-workbench
命令行直接安装MySQL-workbench,安装不了
sudo apt-get install MySQL-workbench
安装包下载地址如下:https://dev.mysql.com/downloads/workbench/,Choose with native systems as wellMySQLDownload the version that matches the version,Since the system and version are Ubuntu20.04 LST 以及MySQL 8.0.29,Therefore, visualization tools are usedmysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb.on the native system vsMySQLThe version is not clear,You can query by referring to the following command line
sudo mysql
SELECT @@VERSION;
完成mysql-workbench版本下载后,终端进入下载目录,进行安装
sudo dpkg -i mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb
If the dependency error shown in the figure below occursYou can enter the following command to solve the problem,Then repeat the above installation command
sudo apt -f install
As in the above setup,允许rootAdministrators connect from remote,So there is in the interfaceLocal instance 3306,Click to enter and enter the password to enter the graphical management interfaceThe connection is successful to startMySQLThe graphical interface operation is used.
总结
For learning and improvement reasons,I installed itwin10与ubuntu 20.04双系统,Articles are meant to be sharedubuntu 20.04系统上安装MySQL与图形化工具mysql-workbenchstep-by-step procedures and problem-solving methods,希望可以帮助到大家.We will continue to share other learning content in the future,Hope to communicate and learn with you,共同进步.
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在.深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小.自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前.因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- mac10.14中安装mysqldb
- uni-app进阶之创建组件/原生渲染【day9】
- 为什么redis是单线程还那么快?
- 12 【网页布局总结 元素的显示与隐藏】
- The process and specific code of sending SMS verification code using flask framework
- 实验7 UDP与TCP对比
- Detailed explanation of pointers in C language
- leetcode-每日一题剑指 Offer II 041. 滑动窗口的平均值(队列模拟)
- 10 【组件编码流程 组件自定义事件 全局事件总线】
- 【云原生】开源数据分析 SPL 轻松应对 T+0
猜你喜欢
leetcode-每日一题558. 四叉树交集(分治递归)
“档次法”——用于物品体积分布不均匀的01背包问题的求解方法
gin框架学习-Gin框架和Gorm框架搭建一个简单的API微服务
What is GameFi?
leetcode-每日一题565. 数组嵌套(标记图和并查集)
The process and specific code of sending SMS verification code using flask framework
leetcode-每日一题1217. 玩筹码(贪心+位运算)
局部变量成员变量、引用类型、this,static(第五天)
常见JVM面试题及答案整理
实验8 DNS解析
随机推荐
可以“繁殖”的程序
Redis first meeting
[Elastic-Job] Overview of Distributed Scheduling Tasks
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
sqlmap注入教程 常用指令
npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
13 【代理配置 插槽】
什么是EVM兼容链?
Digital twins will be an important way to enter the "metaverse"
uni-app进阶之自定义【day13】
Linux修改MySQL数据库密码
gin框架学习-Casbin入门指南(ACL、RBAC、域内RBAC模型)
数字孪生将成为进入“元宇宙”一项重要的途径
Sword Point Offer Special Assault Edition ---- Day 1
第7章 网络层第1次练习题答案(第三版)
Fragmented NFT (Fractional NFT)
变量的解构赋值
1D, 2D, 3D convolution operations in pytorch
07 【内置指令 自定义指令】
什么是 GameFi?