{"id":56,"date":"2008-05-07T20:46:34","date_gmt":"2008-05-08T04:46:34","guid":{"rendered":"http:\/\/www.codebelay.com\/blog\/?p=56"},"modified":"2008-05-12T09:45:57","modified_gmt":"2008-05-12T17:45:57","slug":"sun-breaks-mysqls-source-install","status":"publish","type":"post","link":"https:\/\/www.codebelay.com\/blog\/2008\/05\/07\/sun-breaks-mysqls-source-install\/","title":{"rendered":"Sun Breaks MySQL&#8217;s Source Install"},"content":{"rendered":"<p>I was supposed to go to Medjool to meet up with the <a href=\"http:\/\/www.zappos.com\/\">Zappos<\/a> crew, but instead I ended up helping a pal with a MySQL database upgrade problem with version 5.1.24-rc.<\/p>\n<p>The upgrade was a cluster fuck!<\/p>\n<p>These steps for upgrading MySQL have served me well for the past 9 years.<\/p>\n<pre>\r\ntar cvf backup_data.tar \/usr\/local\/mysql\/var\/*\r\ngzip backup_data.tar\r\ncd \/usr\/local\/src\/mysql-5.1.24-rc\r\n.\/configure --prefix=\/usr\/local\/mysql --with-mysqld-user=mysql --with-ssl\r\nmake\r\nmake install\r\nscripts\/mysql_install_db\r\n<\/pre>\n<p>Then I&#8217;d just run &#8216;\/usr\/local\/libexec\/mysqld &#8211;user=mysql &#038;&#8217; and I&#8217;d be on my merry way to happily computing on the web.<\/p>\n<p>But now wiith version 5.1.24-rc of MySQL, I&#8217;d have to ask what the heck are they doing at Sun to MySQL?<\/p>\n<p>When I started the server, I noticed that the state files were running in \/var . Big fail there, since the prefix is defined as \/usr\/local\/mysql .<\/p>\n<p>Also, I noticed that when I ran scripts\/mysql_install_db there were more path errors:<\/p>\n<p>FATAL ERROR: Could not find \/fill_help_tables.sql<\/p>\n<p>Then the biggest source of fail occured when I ran this:<\/p>\n<p>\/usr\/local\/libexec\/mysqld &#8211;print-defaults<\/p>\n<p>\/usr\/local\/mysql\/libexec\/mysqld would have been started with the following arguments:<\/p>\n<pre>\r\n--port=3306 --socket=\/tmp\/mysql.sock --skip-locking --key_buffer=16M \r\n--max_allowed_packet=1M --table_cache=64 --sort_buffer_size=512K \r\n--net_buffer_length=8K --read_buffer_size=256K \r\n--read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M \r\n--log-bin=mysql-bin --server-id=1 --user=mysql \r\n--pid-file=\/var\/run\/mysqld\/mysqld.pid --socket=\/var\/run\/mysqld\/mysqld.sock\r\n--port=3306 --basedir=\/usr --datadir=\/var\/lib\/mysql --tmpdir=\/tmp\r\n--language=\/usr\/share\/mysql\/english --skip-external-locking --bind-address=127.0.0.1\r\n--key_buffer=16M --max_allowed_packet=16M --thread_stack=128K --thread_cache_size=8\r\n--query_cache_limit=1M --query_cache_size=16M --expire_logs_days=10 --max_binlog_size=100M\r\n--skip-bdb \r\n<\/pre>\n<p>Once again, path errors, and &#8211;skip-bdb is an option that doesn&#8217;t even exist for mysqld!!!!!!<\/p>\n<p>Here was my fix for the scripts&#8217; install:<\/p>\n<pre>\r\n.\/scripts\/mysql_install_db --no-defaults --port=3306 --socket=\/tmp\/mysql.sock \\ \r\n--skip-locking --key_buffer=16M --max_allowed_packet=1M --table_cache=64 \\\r\n--sort_buffer_size=512K --net_buffer_length=8K --read_buffer_size=256K  \\\r\n--read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M --log-bin=mysql-bin \\ \r\n--server-id=1 --user=mysql --pid-file=\/var\/run\/mysqld\/mysqld.pid \\\r\n--socket=\/var\/run\/mysqld\/mysqld.sock \\\r\n --port=3306 --basedir=\/usr\/local\/mysql --datadir=\/usr\/local\/mysql\/var \\\r\n--tmpdir=\/tmp --language=\/usr\/local\/mysql\/share\/mysql\/english --skip-external-locking \\\r\n--bind-address=127.0.0.1 --key_buffer=16M --max_allowed_packet=16M \\\r\n--thread_stack=128K --thread_cache_size=8 --query_cache_limit=1M \\\r\n--query_cache_size=16M --expire_logs_days=10 --max_binlog_size=100M\r\n<\/pre>\n<p>Here&#8217;s my fix for how the server <strong>must<\/strong> start from now on:<\/p>\n<pre>\r\n\/usr\/local\/mysql\/bin\/mysqld_safe --no-defaults --port=3306  \\\r\n--socket=\/tmp\/mysql.sock --skip-locking --key_buffer=16M  \\\r\n--max_allowed_packet=1M --table_cache=64 --sort_buffer_size=512K  \\\r\n--net_buffer_length=8K --read_buffer_size=256K  \\\r\n--read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M  \\\r\n--log-bin=mysql-bin --server-id=1 --user=mysql  \\\r\n--pid-file=\/var\/run\/mysqld\/mysqld.pid  \\\r\n--socket=\/var\/run\/mysqld\/mysqld.sock --port=3306  \\\r\n--basedir=\/usr\/local\/mysql --datadir=\/usr\/local\/mysql\/var  \\\r\n--tmpdir=\/tmp --language=\/usr\/local\/mysql\/share\/mysql\/english  \\\r\n--skip-external-locking --bind-address=127.0.0.1 --key_buffer=16M  \\\r\n--max_allowed_packet=16M --thread_stack=128K --thread_cache_size=8  \\\r\n--query_cache_limit=1M --query_cache_size=16M  \\\r\n--expire_logs_days=10 --max_binlog_size=100M &\r\n<\/pre>\n<p>All that just to start a server, so now, I&#8217;m totally telling my friends to use <a href=\"http:\/\/www.postgresql.org\/\">PostgreSQL<\/a> instead. Sure it&#8217;s slower and doesn&#8217;t scale as much by a factor of 4 compared to MySQL, but hey, maybe it&#8217;s time for something new.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was supposed to go to Medjool to meet up with the Zappos crew, but instead I ended up helping a pal with a MySQL database upgrade problem with version 5.1.24-rc. The upgrade was a cluster fuck! These steps for upgrading MySQL have served me well for the past 9 years. tar cvf backup_data.tar \/usr\/local\/mysql\/var\/* [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[86,88,87],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-mysql","tag-postgres","tag-sun-sucks"],"_links":{"self":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":0,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}