{"id":288,"date":"2008-02-17T22:32:11","date_gmt":"2008-02-17T19:32:11","guid":{"rendered":"http:\/\/www.void.gr\/kargig\/blog\/?p=288"},"modified":"2008-06-06T01:16:26","modified_gmt":"2008-06-05T22:16:26","slug":"sip-express-router-mysql-and-utf8","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2008\/02\/17\/sip-express-router-mysql-and-utf8\/","title":{"rendered":"SIP Express router, mysql and utf8"},"content":{"rendered":"<p>Description:<br \/>\nThere&#8217;s a small problem when using SIP Express Router (net-misc\/ser on Gentoo) with mysql support and your mysql server uses utf8 as a default character set (gentoo&#8217;s latest versions use utf8 by default). <\/p>\n<p>The problem:<br \/>\nOne of ser&#8217;s scripts (ser_mysql.sh) can&#8217;t handle utf8 tables.<br \/>\n<code># ser_mysql.sh create<br \/>\nMySql password for root:<br \/>\nDomain (realm) for the default user 'admin': foobar<br \/>\ncreating database ser ...<br \/>\nERROR 1071 (42000) at line 100: Specified key was too long; max key length is 1000 bytes<br \/>\n<\/code><\/p>\n<p>Solution 1 (remove utf8):<br \/>\nChange the character set to latin1.<br \/>\nThe specified error can easily be &#8220;fixed&#8221; by editing <strong>\/usr\/sbin\/ser_mysql.sh<\/strong>. Inside that script you will find a line like this (line 38):<br \/>\n<code>TABLE_TYPE=\"TYPE=MyISAM\"<\/code><\/p>\n<p>replace it with:<\/p>\n<p><code>TABLE_TYPE=\"TYPE=MyISAM,DEFAULT CHARACTER SET latin1\"<\/code><\/p>\n<p>The result:<br \/>\n<code># ser_mysql.sh create<br \/>\nMySql password for root:<br \/>\nDomain (realm) for the default user 'admin': foobar<br \/>\ncreating database ser ...<br \/>\n<\/code><\/p>\n<p>Solution 2 (reduce some column sizes):<br \/>\nThe following solution makes the script run but I have <strong>not<\/strong> personally tested if ser STILL works ok after the changes. Feel free to experiment and comment back on this:<br \/>\n<code># sed -i 's|domain varchar(128|domain varchar(100|g' \/usr\/sbin\/ser_mysql.sh<br \/>\n# sed -i 's|contact varchar(255|contact varchar(128|g' \/usr\/sbin\/ser_mysql.sh<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: There&#8217;s a small problem when using SIP Express Router (net-misc\/ser on Gentoo) with mysql support and your mysql server uses utf8 as a default character set (gentoo&#8217;s latest versions use utf8 by default). The problem: One of ser&#8217;s scripts (ser_mysql.sh) can&#8217;t handle utf8 tables. # ser_mysql.sh create MySql password for root: Domain (realm) for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[12,3,9],"tags":[],"class_list":["post-288","post","type-post","status-publish","format-standard","hentry","category-gentoo","category-linux","category-voip"],"aioseo_notices":[],"views":6998,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}