snipt

Ctrl+h for KB shortcuts

MySQL

Find MySQL Collation and Charsets

1
2
3
4
USE database_name;

SHOW VARIABLES LIKE "character_set_database";
SHOW VARIABLES LIKE "collation_database";
https://snipt.net/embed/fdaa71b9921a6e4991919d5e578a1791/
/raw/fdaa71b9921a6e4991919d5e578a1791/
fdaa71b9921a6e4991919d5e578a1791
mysql
MySQL
4
2019-07-11T17:21:11
True
False
False
/api/public/snipt/41726/
find-mysql-collation-and-charsets
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">USE</span> <span class="n">database_name</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">SHOW</span> <span class="n">VARIABLES</span> <span class="k">LIKE</span> <span class="s2">&quot;character_set_database&quot;</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a><span class="k">SHOW</span> <span class="n">VARIABLES</span> <span class="k">LIKE</span> <span class="s2">&quot;collation_database&quot;</span><span class="p">;</span> </span></pre></div> </td></tr></table>
charset, collation, mysql, utf8