<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Database on Time Friend</title><link>https://time-friend.com/en/tags/database/</link><description>Recent content in Database on Time Friend</description><generator>Hugo</generator><language>en-GB</language><lastBuildDate>Wed, 29 Jul 2026 15:15:07 +0800</lastBuildDate><atom:link href="https://time-friend.com/en/tags/database/index.xml" rel="self" type="application/rss+xml"/><item><title>MySQL Safe Mode</title><link>https://time-friend.com/en/archive/mysql-safe-mode/</link><pubDate>Sat, 26 Aug 2017 23:36:00 +0000</pubDate><guid>https://time-friend.com/en/archive/mysql-safe-mode/</guid><description>&lt;p&gt;Today when deleting a piece of data, the following error appeared.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -&amp;gt; SQL Queries and reconnect.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Because MySQL is running in safe-updates mode.&lt;/p&gt;
&lt;p&gt;To disable this mode, run the following command:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;SET SQL_SAFE_UPDATES = 0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For safety, it&amp;rsquo;s recommended to restore to default state 1 after completing operations&lt;/p&gt;</description></item><item><title>MySQL Access Denied for User Issue</title><link>https://time-friend.com/en/archive/mysql-access-denied-for-user/</link><pubDate>Fri, 25 Aug 2017 23:36:00 +0000</pubDate><guid>https://time-friend.com/en/archive/mysql-access-denied-for-user/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;When connecting to MySQL from another server, an error appeared: Access denied for user &amp;lsquo;root&amp;rsquo;@&amp;lsquo;xxx.xxx.xxx.xxx&amp;rsquo; (using password: YES).&lt;/p&gt;
&lt;p&gt;This is a database permission issue.&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;On the MySQL server, log in as root and execute the following SQL statement:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;mysql -u root -p
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then enter your password.&lt;/p&gt;
&lt;p&gt;Then execute the following command:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;GRANT ALL PRIVILEGES ON *.* TO &amp;#39;your-account&amp;#39;@&amp;#39;%&amp;#39; IDENTIFIED BY &amp;#39;your-password&amp;#39; WITH GRANT OPTION;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After successful execution:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;FLUSH PRIVILEGES;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then try connecting to your database again, it should work.&lt;/p&gt;</description></item></channel></rss>