<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>分类：Mysql - GodOne</title><link>https://blog.godone.top/categories/Mysql</link><atom:link href="https://blog.godone.top/categories/Mysql/feed/categories/Mysql.xml" rel="self" type="application/rss+xml"/><description>GodOne</description><generator>Halo v2.27.1</generator><language>zh-cn</language><lastBuildDate>Mon, 16 Nov 2026 13:38:25 GMT</lastBuildDate><item><title><![CDATA[Mysql-条件查询]]></title><link>https://blog.godone.top/archives/%E6%9D%A1%E4%BB%B6%E6%9F%A5%E8%AF%A2</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E6%9D%A1%E4%BB%B6%E6%9F%A5%E8%AF%A2&amp;url=/archives/%E6%9D%A1%E4%BB%B6%E6%9F%A5%E8%AF%A2" width="1" height="1" alt="" style="opacity:0;">条件查询命令格式 select 字段名列表名 from 库名.表名 where 查询条件; #只查询匹配项 条件查询有如下类型 数值比较查询 字符比较查询 范围匹配查询 模糊匹配查询 正则匹配查询 逻辑比较查询 别名、拼接、去重查询 别名、拼接、去重 别名：select 字段名 as 别名 fro]]></description><guid isPermaLink="false">/archives/%E6%9D%A1%E4%BB%B6%E6%9F%A5%E8%AF%A2</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item><item><title><![CDATA[Mysql-基础查询]]></title><link>https://blog.godone.top/archives/%E5%9F%BA%E7%A1%80%E6%9F%A5%E8%AF%A2</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E5%9F%BA%E7%A1%80%E6%9F%A5%E8%AF%A2&amp;url=/archives/%E5%9F%BA%E7%A1%80%E6%9F%A5%E8%AF%A2" width="1" height="1" alt="" style="opacity:0;">基础查询命令格式 select 字段名列表名 from 库名.表名; #查看表里的所有数据 查询的字段列表可以是 常量 select 5; 变量 select @@version; 表达式 select 3 + 2; 函数 select count(*) f]]></description><guid isPermaLink="false">/archives/%E5%9F%BA%E7%A1%80%E6%9F%A5%E8%AF%A2</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item><item><title><![CDATA[Mysql-创建表]]></title><link>https://blog.godone.top/archives/%E5%88%9B%E5%BB%BA%E8%A1%A8</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E5%88%9B%E5%BB%BA%E8%A1%A8&amp;url=/archives/%E5%88%9B%E5%BB%BA%E8%A1%A8" width="1" height="1" alt="" style="opacity:0;">建表命令：create table 库名.表名 (表头名1 数据类型 约束条件,表头名2 数据类型 约束条件,表头名3 数据类型 约束条件 ...); 查看表头名：desc 库名.表名 ## 在db1数据库下建立t1表，并查询表头信息 mysql&gt; create table db1.t1(姓名 ch]]></description><guid isPermaLink="false">/archives/%E5%88%9B%E5%BB%BA%E8%A1%A8</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item><item><title><![CDATA[Mysql-设置root用户远程登录]]></title><link>https://blog.godone.top/archives/%E8%AE%BE%E7%BD%AEroot%E7%94%A8%E6%88%B7%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E8%AE%BE%E7%BD%AEroot%E7%94%A8%E6%88%B7%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95&amp;url=/archives/%E8%AE%BE%E7%BD%AEroot%E7%94%A8%E6%88%B7%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95" width="1" height="1" alt="" style="opacity:0;">要允许 MariaDB 的 root 用户从远程主机连接，您需要进行以下几个步骤： 修改root密码（默认密码为空时） mysqladmin password 登录到 MariaDB mysql -u root -p 创建或修改 root 用户的远程访问权限 检查现有用户 运行以下命令查看现有的 r]]></description><guid isPermaLink="false">/archives/%E8%AE%BE%E7%BD%AEroot%E7%94%A8%E6%88%B7%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item><item><title><![CDATA[Mysql-导入数据库]]></title><link>https://blog.godone.top/archives/%E5%AF%BC%E5%85%A5%E6%95%B0%E6%8D%AE%E5%BA%93</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E5%AF%BC%E5%85%A5%E6%95%B0%E6%8D%AE%E5%BA%93&amp;url=/archives/%E5%AF%BC%E5%85%A5%E6%95%B0%E6%8D%AE%E5%BA%93" width="1" height="1" alt="" style="opacity:0;">准备相应的 .sql 文件 使用命令导入数据库 [root@WM-5CD414BFCD ~]# mysql -uroot -p &lt; learn.sql Enter password: [root@WM-5CD414BFCD ~]#]]></description><guid isPermaLink="false">/archives/%E5%AF%BC%E5%85%A5%E6%95%B0%E6%8D%AE%E5%BA%93</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item><item><title><![CDATA[Mysql-密码管理]]></title><link>https://blog.godone.top/archives/%E5%AF%86%E7%A0%81%E7%AE%A1%E7%90%86</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E5%AF%86%E7%A0%81%E7%AE%A1%E7%90%86&amp;url=/archives/%E5%AF%86%E7%A0%81%E7%AE%A1%E7%90%86" width="1" height="1" alt="" style="opacity:0;">初始化密码 刚安装好的mysql服务是没有密码的，我们需要给root用户设置一个密码 修改密码 进入mysql数据库，执行 alter user root@"localhost" identified by "root"; 密码策略 查看策略 以下命令可查看现有的密码策略 show variabl]]></description><guid isPermaLink="false">/archives/%E5%AF%86%E7%A0%81%E7%AE%A1%E7%90%86</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item><item><title><![CDATA[Mysql-用户设置]]></title><link>https://blog.godone.top/archives/mysql-%E7%94%A8%E6%88%B7%E8%AE%BE%E7%BD%AE</link><description><![CDATA[<img src="https://blog.godone.top/plugins/feed/assets/telemetry.gif?title=Mysql-%E7%94%A8%E6%88%B7%E8%AE%BE%E7%BD%AE&amp;url=/archives/mysql-%E7%94%A8%E6%88%B7%E8%AE%BE%E7%BD%AE" width="1" height="1" alt="" style="opacity:0;">创建用户 要创建一个新用户，你可以使用以下 SQL 命令： CREATE USER 'username'@'host' IDENTIFIED BY 'password'; username：用户名。 host：指定用户可以从哪些主机连接。例如，localhost 仅允许本地连接，% 允许从任何主机连]]></description><guid isPermaLink="false">/archives/mysql-%E7%94%A8%E6%88%B7%E8%AE%BE%E7%BD%AE</guid><dc:creator>GodOne</dc:creator><category>Mysql</category><category>数据库</category><pubDate>Sun, 1 Nov 2026 17:12:04 GMT</pubDate></item></channel></rss>