<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MySQL on yearliny</title><link>https://yearliny.com/tag/mysql/</link><description>Recent content in MySQL on yearliny</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Mon, 25 Apr 2022 16:05:40 +0800</lastBuildDate><atom:link href="https://yearliny.com/feed/tag/mysql/index.xml" rel="self" type="application/rss+xml"/><item><title>Java 中 Date 存储到 MySQL 字段时间不一致问题</title><link>https://yearliny.com/inconsistency-of-the-time-when-date-is-stored-in-the-mysql-field-in-java/</link><pubDate>Mon, 25 Apr 2022 12:29:47 +0800</pubDate><guid>https://yearliny.com/inconsistency-of-the-time-when-date-is-stored-in-the-mysql-field-in-java/</guid><description>&lt;h2 id="问题情景"&gt;&lt;span class="heading-ink"&gt;问题情景&lt;/span&gt;&lt;a class="heading-anchor" href="#%e9%97%ae%e9%a2%98%e6%83%85%e6%99%af" aria-label="链接到此段落"&gt;&lt;img class="icon" src="https://yearliny.com/notebook/icons/link.svg" width="24" height="24" alt="" aria-hidden="true"&gt;&#10;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;在 Java 代码中使用 &lt;code&gt;new Date()&lt;/code&gt; 赋值日期，存储到数据库 &lt;code&gt;DATETIME&lt;/code&gt; 字段后，在数据库中多了一秒，经过排查是数据库对Java Date 值进行了四舍五入，导致此问题。&lt;/p&gt;</description></item><item><title>Ubuntu18.04 安装 Mysql</title><link>https://yearliny.com/install-mysql-from-ubuntu18-04/</link><pubDate>Sun, 20 May 2018 11:41:39 +0800</pubDate><guid>https://yearliny.com/install-mysql-from-ubuntu18-04/</guid><description>&lt;p&gt;按照往常的方法安装Mysql完成后，无法通过Mysql root用户登录，错误提示&lt;strong&gt;ERROR 1698 (28000): Access denied for user ‘root’@’localhost&lt;/strong&gt;’，搜索后发现是Ubuntu-Desktop 18.04 版本 Mysql 所有账户默认使用 &lt;a href="https://dev.mysql.com/doc/refman/8.0/en/socket-pluggable-authentication.html"&gt;auth_socket plugin&lt;/a&gt; 验证插件（Ubuntu-Server仅有root账号默认使用auth_socket plugin），所以需要以系统管理员 root 用户启动 Mysql 才可以正常登录。&lt;/p&gt;</description></item><item><title>Ubuntu搭建LAMP环境</title><link>https://yearliny.com/ubuntu-install-lamp/</link><pubDate>Mon, 07 Aug 2017 21:49:09 +0800</pubDate><guid>https://yearliny.com/ubuntu-install-lamp/</guid><description>&lt;p&gt;LAMP环境是许多WEB程序的标配，LAMP环境包括Linux、Apache2、Mysql、PHP，作为最流行的WEB程序环境，安装的过程也在不断的被简化，在Ubuntu中安装LAMP环境甚至只需要一行命令。&lt;/p&gt;</description></item><item><title>WordPress更改数据库密码后提示错误修复</title><link>https://yearliny.com/tip-bug-fixes-after-wordpress-change-database-password/</link><pubDate>Wed, 23 Dec 2015 12:08:37 +0800</pubDate><guid>https://yearliny.com/tip-bug-fixes-after-wordpress-change-database-password/</guid><description>&lt;p&gt;原因：改了数据库密码之后WordPress程序不能连接到数据库，所以需要修改WordPress中的配置密码。用FTP打开自己的WordPress程序根目录下，找到wp-config.php文件打开编辑，如果用的是ftp软件，就先传到本地，打开找到其中的以下段落:&lt;/p&gt;</description></item></channel></rss>