<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://woodrow.cn/w/index.php?action=history&amp;feed=atom&amp;title=MySQL</id>
	<title>MySQL - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://woodrow.cn/w/index.php?action=history&amp;feed=atom&amp;title=MySQL"/>
	<link rel="alternate" type="text/html" href="http://woodrow.cn/w/index.php?title=MySQL&amp;action=history"/>
	<updated>2026-05-15T14:09:21Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>http://woodrow.cn/w/index.php?title=MySQL&amp;diff=18&amp;oldid=prev</id>
		<title>Woodrow：建立内容为“== MySQL Community Server == https://downloads.mysql.com/archives/community/  == 卸载MariaDB == &lt;syntaxhighlight lang=&quot;bash&quot;&gt; rpm -qa | grep -i mariadb rpm -e m…”的新页面</title>
		<link rel="alternate" type="text/html" href="http://woodrow.cn/w/index.php?title=MySQL&amp;diff=18&amp;oldid=prev"/>
		<updated>2022-03-30T14:15:42Z</updated>

		<summary type="html">&lt;p&gt;建立内容为“== MySQL Community Server == https://downloads.mysql.com/archives/community/  == 卸载MariaDB == &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; rpm -qa | grep -i mariadb rpm -e m…”的新页面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== MySQL Community Server ==&lt;br /&gt;
https://downloads.mysql.com/archives/community/&lt;br /&gt;
&lt;br /&gt;
== 卸载MariaDB ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rpm -qa | grep -i mariadb&lt;br /&gt;
rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 创建目录、解压 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir mysql&lt;br /&gt;
tar -xvf mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar -C mysql&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 安装MySQL ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd mysql&lt;br /&gt;
rpm -ivh mysql-community-common-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
rpm -ivh mysql-community-client-plugins-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
rpm -ivh mysql-community-libs-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
rpm -ivh mysql-community-libs-compat-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
yum install openssl-devel&lt;br /&gt;
rpm -ivh mysql-community-devel-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
rpm -ivh mysql-community-client-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
rpm -ivh mysql-community-server-8.0.26-1.el7.x86_64.rpm&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 启动MySQL服务 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl start mysqld&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 查询自动生成的root用户密码 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
grep 'temporary password' /var/log/mysqld.log&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mysql -u root -p&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 修改root用户密码 ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set global validate_password.policy = 0;&lt;br /&gt;
set global validate_password.length = 8;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 创建用户 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 授予权限 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
GRANT ALL ON *.* TO 'root'@'%';&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 重新连接MySQL ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mysql -u root -p&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Woodrow</name></author>
	</entry>
</feed>