<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Archives - CNERIS</title>
	<atom:link href="https://cneris.com/en/category/database-en/mysql-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://cneris.com/en/category/database-en/mysql-en/</link>
	<description></description>
	<lastBuildDate>Sun, 20 Oct 2024 16:45:37 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Steps to Convert the Database from utf8 to utf8mb4 in MySQL</title>
		<link>https://cneris.com/en/steps-to-convert-the-database-from-utf8-to-utf8mb4-in-mysql/</link>
					<comments>https://cneris.com/en/steps-to-convert-the-database-from-utf8-to-utf8mb4-in-mysql/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 20 Oct 2024 16:45:14 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[convert the columns]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">https://cneris.com/?p=2511</guid>

					<description><![CDATA[<p>Connect to MySQL:First, log into MySQL using the following command: mysql -u your_user -p Enter your password when prompted. Convert the Database:Run the following command to convert the entire database to utf8mb4. Replace your_database_name with the actual name of your database. ALTER DATABASE your_database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; Convert the Tables:After converting the database, [...]</p>
<p>The post <a href="https://cneris.com/en/steps-to-convert-the-database-from-utf8-to-utf8mb4-in-mysql/">Steps to Convert the Database from utf8 to utf8mb4 in MySQL</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></description>
										<content:encoded><![CDATA[<ul>
<li><strong>Connect to MySQL</strong>:First, log into MySQL using the following command:
<div class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="sticky top-9 md:top-[5.75rem]"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">mysql -u your_user -p<br />
</code></div>
</div>
<p>Enter your password when prompted.</li>
<li><strong>Convert the Database</strong>:Run the following command to convert the entire database to <strong>utf8mb4</strong>. Replace <code>your_database_name</code> with the actual name of your database.
<div class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="sticky top-9 md:top-[5.75rem]"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-sql"><span class="hljs-keyword">ALTER</span> DATABASE your_database_name <span class="hljs-type">CHARACTER</span> <span class="hljs-keyword">SET</span> utf8mb4 <span class="hljs-keyword">COLLATE</span> utf8mb4_unicode_ci;<br />
</code></div>
</div>
</li>
<li><strong>Convert the Tables</strong>:After converting the database, you need to convert each table within the database:
<div class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="sticky top-9 md:top-[5.75rem]"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-sql"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> your_table_name <span class="hljs-keyword">CONVERT</span> <span class="hljs-keyword">TO</span> <span class="hljs-type">CHARACTER</span> <span class="hljs-keyword">SET</span> utf8mb4 <span class="hljs-keyword">COLLATE</span> utf8mb4_unicode_ci;<br />
</code></div>
</div>
<p>Do this for each table in your database.</li>
<li><strong>Convert the Columns</strong> (optional):If any columns within your tables need to be converted specifically, you can do so with the following command:
<div class="contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="sticky top-9 md:top-[5.75rem]"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-sql"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> your_table_name MODIFY your_column_name <span class="hljs-type">VARCHAR</span>(<span class="hljs-number">255</span>) <span class="hljs-type">CHARACTER</span> <span class="hljs-keyword">SET</span> utf8mb4 <span class="hljs-keyword">COLLATE</span> utf8mb4_unicode_ci;<br />
</code></div>
</div>
<p>This will convert the column to <strong>utf8mb4</strong>.</li>
</ul>
<p>The post <a href="https://cneris.com/en/steps-to-convert-the-database-from-utf8-to-utf8mb4-in-mysql/">Steps to Convert the Database from utf8 to utf8mb4 in MySQL</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cneris.com/en/steps-to-convert-the-database-from-utf8-to-utf8mb4-in-mysql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
