MySQL: Difference between revisions

No edit summary
No edit summary
Line 116: Line 116:
</source>
</source>


To set the mysql server to utf8, add the following to <code>/etc/mysql/my.cnf</code> (Debian/Ubuntu) or <code>/etc/my.cnf</code> (Fedora/Centos/RHEL) under the '''<nowiki>[mysqld]</nowiki>''' section:
To set the mysql server to utf8 <ref>https://mariadb.com/kb/en/library/setting-character-sets-and-collations/ https://scottlinux.com/2017/03/04/mysql-mariadb-set-character-set-and-collation-to-utf8/</ref>, add the following to <code>/etc/mysql/my.cnf</code> (Debian/Ubuntu) or <code>/etc/my.cnf</code> (Fedora/Centos/RHEL) under the '''<nowiki>[mysqld]</nowiki>''' section:
<pre>
<pre>
character-set-server = utf8
character-set-server = utf8
Line 125: Line 125:
*<code>service mariadb restart</code> for Debian/Ubuntu;  
*<code>service mariadb restart</code> for Debian/Ubuntu;  
*<code>/bin/systemctl restart mariadb.service</code> for Fedora/Centos/RHEL
*<code>/bin/systemctl restart mariadb.service</code> for Fedora/Centos/RHEL
<ref>https://mariadb.com/kb/en/library/setting-character-sets-and-collations/ https://scottlinux.com/2017/03/04/mysql-mariadb-set-character-set-and-collation-to-utf8/</ref>


== Working at the Console ==
== Working at the Console ==
Reading output from the mysql command line client is notoriously ugly/hard.  With the <code>-s --silent</code> or <code>-B --batch</code> options, you can get output that is more readable.
Reading output from the mysql command line client is notoriously ugly/hard.  With the <code>-s --silent</code> or <code>-B --batch</code> options, you can get output that is more readable.




Line 147: Line 144:
# https://www.percona.com/blog/2016/10/12/mysql-5-7-performance-tuning-immediately-after-installation/
# https://www.percona.com/blog/2016/10/12/mysql-5-7-performance-tuning-immediately-after-installation/
# https://www.percona.com/blog/2009/11/16/table_cache-negative-scalability/
# https://www.percona.com/blog/2009/11/16/table_cache-negative-scalability/
== Footnotes ==
<References />


[[Category:Database]]
[[Category:Database]]