当前位置:网站首页>ubuntu22.04安装mysql8
ubuntu22.04安装mysql8
2022-07-23 15:48:00 【勤奋的凯尔森同学】
ubuntu22.04安装mysql8
为了更好的浏览体验,欢迎光顾勤奋的凯尔森同学个人博客http://nas.hepcloud.top:7000
#也可以访问https://dev.mysql.com/downloads/repo/apt/获取配置包
wget https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb
#执行此安装配置包
dpkg -i mysql-apt-config_0.8.14-1_all.deb
#更新
apt-get update
#安装mysqlserver
apt-get install mysql-server
#安装mysqlclient
apt-get install mysql-client
#登陆mysql
mysql -uroot -p
#修改root密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY '123456';
#如果修改不成功,可以执行下面这一句
create user 'root'@'%' identified by '123456';
#授权所有操作权限给root
grant all privileges on *.* to 'root'@'%';
#创建一个hep用户,并授权所有操作权限
create user 'hep'@'%' identified by '123456';
grant all privileges on *.* to 'hep'@'%';
#刷新权限
flush privileges;
#退出
exit;
#使得mysql可以远程登陆
vim /etc/mysql/mysql.conf.d/mysqld.cnf
#注释掉这一行
#bind-address = 127.0.0.1
#重启mysql
service mysql restart;
#开放3306端口
ufw allow 3306
#查看3306端口是否被监听
netstat -anp | grep mysql
边栏推荐
猜你喜欢

Common operations of idea debug

(11) STM32 - IO pin multiplexing and mapping

Did not find the necessary patch file 'newopui.pak'?

Seata

Sentinel 安装图解

强化学习---马尔可夫决策过程 MP MRP MDP

Data crawling and display of e-commerce platform based on scratch

前置放大器和功率放大器有什么区别?

There is an error prompt when configuring the GOM engine login: the necessary patch file is not found!

没有发现必备补丁文件‘NewopUI.pak’?
随机推荐
gom及gee架设黑屏的原因以及个别装备地图不显示怎么办?
参与开源社区还有证书拿?
Comparison of several operation and maintenance tools
Createfilemapping function "suggestions collection"
Page return update
Seata
How does memory alignment in go optimize program efficiency?
多线程编程
Seata
常用的curl命令及参数详解
Redis data loss problem
Mutual certification of product compatibility between tapdata and Youxuan database
Don't you know more than 30 baby plug-ins like idea that are both easy to use and fun? "Suggested collection"
On Monday, I asked | what constraints will take effect in the comprehensive stage of vivado?
卡方分布、方差分析
rust猜数字游戏
Eric6安装问题
As a background developer, you must know two kinds of filters
MySQL8.0.23四次重装都失败在 'Writing configuration file'
PDO operation