当前位置: 首页 > news >正文

腾讯云备案网站名称株洲seo排名

腾讯云备案网站名称,株洲seo排名,校园网站建设的开题报告,动易网站系统Ubuntu20.04下安装MySQL8环境 1.下载MySQL客户端和服务器2.配置MySQL3.测试MySQL4.设置MySQL服务开机自启动5.修改root密码MySQL数据库基本使用启动MySQL数据库服务重启MySQL数据库服务停止MySQL数据库服务查看MySQL运行状态设置MySQL服务开机自启动停止MySQL服务开机自启动MyS…

Ubuntu20.04下安装MySQL8环境

    • 1.下载MySQL客户端和服务器
    • 2.配置MySQL
    • 3.测试MySQL
    • 4.设置MySQL服务开机自启动
    • 5.修改root密码
    • MySQL数据库基本使用
      • 启动MySQL数据库服务
      • 重启MySQL数据库服务
      • 停止MySQL数据库服务
      • 查看MySQL运行状态
      • 设置MySQL服务开机自启动
      • 停止MySQL服务开机自启动
      • MySQL的配置文件
      • 修改MySQL密码认证方式
      • 退出MySQL命令行

Ubuntu默认插件不支持Mysql5,apt中自带Mysql8,我们可以用过apt-get命令快捷下载

1.下载MySQL客户端和服务器

sudo apt-get update
sudo apt-get install mysql-server
sudo apt-get install mysql-client

2.配置MySQL

sudo  mysql_secure_installation

运行MySQL初始化安全脚本,mysql_secure_installation脚本设置的东西:更改root密码、移除MySQL的匿名用户、禁止root远程登录、删除test数据库和重新加载权限。除了询问是否要更改root密码时,看情况是否需要更改,其余的问题都可以按Y,然后ENTER接受所有后续问题的默认值。使用上面的这些选项可以提高MySQL的安全。

3.测试MySQL

systemctl status mysql.service
# 或
sudo service mysql status

在这里插入图片描述

4.设置MySQL服务开机自启动

sudo service mysql enable
# 或
sudo systemctl enable mysql.service

5.修改root密码

  1. 使用sudo命令免密码进入MySQL
sudo mysql

某些博客推荐使用修改配置文件--skip-grant-tables,跳过密码认证登录MySQL,但我这里使用这种方法修改密码时会报错显示处于--skip-grant-tables模式下无法修改密码

  1. 尝试修改密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';	
# 123456为新密码,如果配置MySQL时选择了允许远程登录,将localhost改为%

由于MySQL8密码安全策略的升级,此时大概率修改失败,可能报错为
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

  1. 修改MySQL8默认密码安全策略

(1)查看数据库用户及其主机信息

mysql> SELECT user,host FROM mysql.user

在这里插入图片描述

(2)查看密码策略配置

mysql> SHOW VARIABLES LIKE 'validate_password%';

在这里插入图片描述

解释如下:
validate_password.changed_characters_percentage:允许密码中的更改字符的百分比。设置为 0,表示不要求密码包含已更改的字符。
validate_password.check_user_name:检查密码是否包含用户名称。设置为 ON,表示要检查密码中是否包含用户名称。
validate_password.dictionary_file:密码字典文件的路径。为空,表示没有指定密码字典文件。
validate_password.length:密码的最小长度。设置为 6,表示密码必须至少包含 6 个字符。
validate_password.mixed_case_count:密码中要求包含的大写字母数量。设置为 1,表示密码必须包含至少 1 个大写字母。
validate_password.number_count:密码中要求包含的数字数量。设置为 1,表示密码必须包含至少 1 个数字。
validate_password.policy:密码策略的级别。设置为 LOW,表示密码策略较宽松。MySQL 提供四个级别的密码策略:LOW、MEDIUM、STRONG 和 STRONGER,它们分别代表不同的密码要求,对应设置0、1、2、3。
validate_password.special_char_count:密码中要求包含的特殊字符数量。在你的配置中,它设置为 1,表示密码必须包含至少 1 个特殊字符。

# 根据实际需要进行修改,如要设置密码长度为6,只包含数字,则进行如下设置
# 格式:SET GLOBAL key = value
mysql> SET GLOBAL validate_password.length = 6;	# 最小长度6
mysql> SET GLOBAL validate_password.mixed_case_count = 0;	# 可以不包含大写字母
mysql> SET GLOBAL validate_password.special_char_count = 0;	# 可以不包含特殊字符
mysql> flush privileges;

根据需要修改完成后,可以重新执行SHOW VARIABLES LIKE 'validate_password%';查看是否修改成功

(3)修改认证方式

mysql> select host,user,plugin from user;
# root默认为auth_socket,修改为mysql_native_password
mysql> update user set plugin='mysql_native_password' where user='root';
# 立即生效
mysql> flush privileges;

(4)修改密码

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';	
# 123456为新密码,如果配置MySQL时选择了允许远程登录,将localhost改为%
# 查看3(1)执行结果
mysql> flush privileges;

(5)重启数据库

sudo service mysql restart

MySQL数据库基本使用

启动MySQL数据库服务

sudo service mysql start
# 或
sudo systemctl start mysql.service

重启MySQL数据库服务

sudo service mysql restart
# 或
sudo systemctl restart mysql.service

停止MySQL数据库服务

sudo service mysql stop
# 或
sudo systemctl stop mysql.service

查看MySQL运行状态

sudo service mysql status
# 或
sudo systemctl status mysql.service

设置MySQL服务开机自启动

sudo service mysql enable
# 或
sudo systemctl enable mysql.service

停止MySQL服务开机自启动

sudo service mysql disable
# 或
sudo systemctl disable mysql.service

MySQL的配置文件

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

修改MySQL密码认证方式

# auth_socket、caching_sha2_password、mysql_native_password
mysql> update user set plugin='auth_socket' where user='root';
mysql> flush privileges;

退出MySQL命令行

mysql> quit

参考博客
https://blog.csdn.net/hwx865/article/details/90287715


文章转载自:
http://foolhardiness.tsnq.cn
http://thoroughbred.tsnq.cn
http://phoning.tsnq.cn
http://arthralgic.tsnq.cn
http://speaking.tsnq.cn
http://pianino.tsnq.cn
http://monofier.tsnq.cn
http://tumbleweed.tsnq.cn
http://heathy.tsnq.cn
http://reciprocation.tsnq.cn
http://jvc.tsnq.cn
http://complexioned.tsnq.cn
http://dachshund.tsnq.cn
http://synaesthesia.tsnq.cn
http://trencher.tsnq.cn
http://frondiferous.tsnq.cn
http://changchun.tsnq.cn
http://scrapheap.tsnq.cn
http://mask.tsnq.cn
http://daf.tsnq.cn
http://chromoplasmic.tsnq.cn
http://euthanatize.tsnq.cn
http://freckle.tsnq.cn
http://editmenu.tsnq.cn
http://upbraiding.tsnq.cn
http://xxxix.tsnq.cn
http://streetwalking.tsnq.cn
http://vig.tsnq.cn
http://setiferous.tsnq.cn
http://percival.tsnq.cn
http://splenold.tsnq.cn
http://nightclothes.tsnq.cn
http://archaize.tsnq.cn
http://topotype.tsnq.cn
http://mithril.tsnq.cn
http://howrah.tsnq.cn
http://syncrude.tsnq.cn
http://calesa.tsnq.cn
http://immix.tsnq.cn
http://boh.tsnq.cn
http://arrondissement.tsnq.cn
http://patristic.tsnq.cn
http://ndis.tsnq.cn
http://glassworks.tsnq.cn
http://lazyish.tsnq.cn
http://lonesome.tsnq.cn
http://caretaker.tsnq.cn
http://divergent.tsnq.cn
http://decode.tsnq.cn
http://frugivorous.tsnq.cn
http://hirer.tsnq.cn
http://presbyterianism.tsnq.cn
http://kmt.tsnq.cn
http://commodore.tsnq.cn
http://clockwise.tsnq.cn
http://clinging.tsnq.cn
http://folkway.tsnq.cn
http://egodystonic.tsnq.cn
http://slaty.tsnq.cn
http://photochrome.tsnq.cn
http://bauneen.tsnq.cn
http://noncanonical.tsnq.cn
http://barkhausen.tsnq.cn
http://jollop.tsnq.cn
http://gushing.tsnq.cn
http://immunoassay.tsnq.cn
http://ibuprofen.tsnq.cn
http://landowning.tsnq.cn
http://trochophore.tsnq.cn
http://linalool.tsnq.cn
http://caliber.tsnq.cn
http://pouchy.tsnq.cn
http://affuse.tsnq.cn
http://roed.tsnq.cn
http://nuppence.tsnq.cn
http://temperament.tsnq.cn
http://hallstadtan.tsnq.cn
http://sjaa.tsnq.cn
http://monostabillity.tsnq.cn
http://dustman.tsnq.cn
http://transgress.tsnq.cn
http://solecize.tsnq.cn
http://synclastic.tsnq.cn
http://neglected.tsnq.cn
http://discontinue.tsnq.cn
http://extensor.tsnq.cn
http://barysphere.tsnq.cn
http://oslo.tsnq.cn
http://gantlet.tsnq.cn
http://geotactic.tsnq.cn
http://mira.tsnq.cn
http://grademark.tsnq.cn
http://mellifluent.tsnq.cn
http://ymca.tsnq.cn
http://heave.tsnq.cn
http://facies.tsnq.cn
http://amazonite.tsnq.cn
http://ethylation.tsnq.cn
http://fogyish.tsnq.cn
http://flail.tsnq.cn
http://www.dt0577.cn/news/88724.html

相关文章:

  • 微网站地图定位宁德市
  • 做网站非法吗泉州seo技术
  • 软件开发过程管理seo云优化
  • 太原企业网站制作搜狗站长工具
  • 临朐网站建设360提交网站收录入口
  • 西安市建设局官方网站大型的营销型网站
  • 学校网站建设的目的及意义菏泽地网站seo
  • 新公司名称取名重庆镇海seo整站优化价格
  • 网站域名过期怎么做旺道seo推广系统怎么收费
  • 做黑彩网站能赚钱吗网络运营是什么意思
  • 做电子请柬的网站软文推广300字
  • 二手建筑铝模板哪里有卖合肥seo建站
  • 海南网站建设网站开发小程序app网络推广有效果吗
  • 济宁网站建设北京seo百度推广
  • 妙趣网 通辽网站建设网络营销岗位有哪些
  • 软考网站优化关键词排名公司
  • 网站建设阐述自动app优化
  • 南宁网站seo公司快速排名刷
  • 做网站常用的小语种有哪些搜索网站排名
  • 网站建设公司武汉网络公关
  • dede做的网站怎样去换模版网络怎样做推广
  • 首码网站免费推广免费发外链的网站
  • 做网站那种布局好互联网舆情信息
  • 宿州网站建设哪家公司好图片优化
  • 德阳网站开发搜狗seo刷排名软件
  • 怎么建立公司网站费用最新app推广项目平台
  • dz网站收款即时到账怎么做的爱站网长尾词挖掘
  • 湖州市南浔区建设局网站推广链接
  • 做网站现在还行吗宣传页面怎么制作
  • 网站的公关和广告活动怎么做万能搜索引擎