<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[我的小世界呀]]></title><description><![CDATA[哈喽~欢迎光临]]></description><link>https://cxbl.top</link><image><url>https://cxbl.top/innei.svg</url><title>我的小世界呀</title><link>https://cxbl.top</link></image><generator>Shiro (https://github.com/Innei/Shiro)</generator><lastBuildDate>Sat, 18 Apr 2026 15:36:52 GMT</lastBuildDate><atom:link href="https://cxbl.top/feed" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Apr 2026 15:36:52 GMT</pubDate><language><![CDATA[zh-CN]]></language><item><title><![CDATA[yum 源安装mysql8]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://cxbl.top/posts/linux/yum-mysql8">https://cxbl.top/posts/linux/yum-mysql8</a></blockquote><div><ul><li>下载安装包</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm</code></pre><ul><li>安装mysql的rpm包</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">yum -y install mysql80-community-release-el7-3.noarch.rpm</code></pre><ul><li>安装mysql服务</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">yum install -y mysql-community-server --nogpgcheck   #--nogpgcheck,不检查gpg密钥</code></pre><ul><li>启动服务&amp; 设置自启动</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">systemctl start mysqld   #启动MySQL
systemctl enable mysqld        #开机自启MySQL</code></pre><ul><li>查看初始密码</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">grep &quot;password&quot; /var/log/mysqld.log</code></pre><ul><li>修改密码</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">sudo mysql_secure_installation     #设置密码
Enter password for user root:
#输入/var/log/mysqld.log中获得密码
New password:
#输入新的密码
Re-enter new password:
#重复输入新的密码
Change the password for root ? ((Press y|Y for Yes, any other key for No)
#是否想改变root的密码
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No)
#输入Y
Remove anonymous users? (Press y|Y for Yes, any other key for No)
#删除匿名用户
Disallow root login remotely? (Press y|Y for Yes, any other key for No)
#是否禁止远程登录
Remove test database and access to it? (Press y|Y for Yes, any other key for No)
#是否删除test数据库
Reload privilege tables now? (Press y|Y for Yes, any other key for No)
#是否刷新权限</code></pre><ul><li>密码规则</li></ul><pre class="language-shell lang-shell"><code class="language-shell lang-shell">SHOW VARIABLES LIKE &#x27;validate_password%&#x27;;       #查看有哪些密码策略

SET GLOBAL validate_password.policy= 0;       #密码复杂度设置为低    1为中  2为高

set global validate_password.length = 6;    #设置密码长度为6

ALTER USER &#x27;root&#x27;@&#x27;localhost&#x27; IDENTIFIED BY &#x27;密码&#x27;;    # 再次修改密码

create user root@&quot;%&quot; identified by &quot;密码&quot;;      #允许root用户远程连接

grant all privileges on *.* to root@&quot;%&quot; with grant option;#为新用户赋权</code></pre>‵·
</div><p style="text-align:right"><a href="https://cxbl.top/posts/linux/yum-mysql8#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://cxbl.top/posts/linux/yum-mysql8</link><guid isPermaLink="true">https://cxbl.top/posts/linux/yum-mysql8</guid><dc:creator><![CDATA[Orange]]></dc:creator><pubDate>Thu, 02 Apr 2026 03:04:22 GMT</pubDate></item></channel></rss>