{"id":2254,"date":"2013-07-12T15:21:24","date_gmt":"2013-07-12T07:21:24","guid":{"rendered":"http:\/\/rmohan.com\/?p=2254"},"modified":"2013-07-12T15:23:22","modified_gmt":"2013-07-12T07:23:22","slug":"how-to-install-mysql-with-partition-enabled","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2254","title":{"rendered":"How to install Mysql with partition enabled"},"content":{"rendered":"<div>We can check how can we able to setting up mysql server with partition enabled. Lets see what is mysql partition means.<\/div>\n<p>&nbsp;<\/p>\n<div>A partition is a division of a logical database or its constituting elements into distinct independent parts. Database partitioning is normally done for manageability, performance or availability reasons.<\/div>\n<p>&nbsp;<\/p>\n<div>A popular and favourable application of partitioning is in a distributed database management system. Each partition may be spread over multiple nodes, and users at the node can perform local transactions on the partition. This increases performance for sites that have regular transactions involving certain views of data, whilst maintaining availability and security.<\/div>\n<p>&nbsp;<\/p>\n<div>The partitioning can be done by either building separate smaller databases (each with its own tables, indices, and transaction logs), or by splitting selected elements.<\/div>\n<div><\/div>\n<div><\/div>\n<p>Follow the steps to install mysql server with partition enabled<\/p>\n<p>First get a package<\/p>\n<div><\/div>\n<div># gunzip mysql-5.5.12.tar.gz<\/div>\n<div># tar -xvf mysql-5.5.12.tar<\/div>\n<div><\/div>\n<div># cd mysql-5.5.12<\/div>\n<div># mysql-5.5.12 &gt; cmake . -LH<\/div>\n<div># mysql-5.5.12 &gt; cmake .<\/div>\n<div># mysql-5.5.12 &gt; make<\/div>\n<div><\/div>\n<div># mysql-5.5.12 &gt; make install<\/div>\n<div># cd \/usr\/local\/mysql\/<\/div>\n<div># chown mysql:mysql . -R<\/div>\n<div># scripts\/mysql_install_db &#8211;datadir=\/usr\/local\/mysql\/data\/ &#8211;user=mysql<\/div>\n<p>&#8212;-<br \/>\nInstalling MySQL system tables&#8230;<br \/>\nOK<br \/>\nFilling help tables&#8230;<br \/>\nOK<\/p>\n<p>To start mysqld at boot time you have to copy<br \/>\nsupport-files\/mysql.server to the right place for your system<\/p>\n<p>PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !<br \/>\nTo do so, start the server, then issue the following commands:<\/p>\n<p>.\/bin\/mysqladmin -u root password &#8216;new-password&#8217;<br \/>\n.\/bin\/mysqladmin -u root -h systemspfx4 password &#8216;new-password&#8217;<\/p>\n<p>Alternatively you can run:<br \/>\n.\/bin\/mysql_secure_installation<\/p>\n<p>which will also give you the option of removing the test<br \/>\ndatabases and anonymous user created by default.\u00a0 This is<br \/>\nstrongly recommended for production servers.<\/p>\n<p>See the manual for more instructions.<\/p>\n<p>You can start the MySQL daemon with:<br \/>\ncd . ; .\/bin\/mysqld_safe &amp;<\/p>\n<p>You can test the MySQL daemon with mysql-test-run.pl<br \/>\ncd .\/mysql-test ; perl mysql-test-run.pl<\/p>\n<p>Please report any problems with the .\/bin\/mysqlbug script!<br \/>\n&#8212;&#8212;<\/p>\n<div>create a my.cnf file, here i copied from another system and added the needed parameters including the port which the server want to start.<\/div>\n<div><\/div>\n<div># scp my.cnf\u00a0 root@IP:\/usr\/local\/mysql\/<\/div>\n<div><\/div>\n<div>Start the server<\/div>\n<div>#.\/bin\/mysqld_safe &#8211;defaults-file=\/usr\/local\/mysql\/my.cnf &amp;<\/div>\n<div><\/div>\n<div>We can login using<\/div>\n<div># \/usr\/local\/mysql\/bin\/mysql -uroot -h 127.0.0.1 -P3307<\/div>\n<div><\/div>\n<div>We can start the server in some other ways also<\/div>\n<div>Start the server in background<\/div>\n<div># nohup sh \/usr\/local\/mysql\/bin\/mysqld_safe &#8211;defaults-file=\/usr\/local\/mysql\/my.cnf\u00a0 &amp;<\/div>\n<div><\/div>\n<div>Enabled the general log and slow queries<\/div>\n<div># nohup sh \/usr\/local\/mysql\/bin\/mysqld_safe &#8211;general_log=1 &#8211;log-slow-queries=\/usr\/local\/mysql\/data\/RHEL664PFMX-SLOW.log &amp;<\/div>\n<div><\/div>\n<div>And we can see the server is up and running in port 3307<\/div>\n","protected":false},"excerpt":{"rendered":"<p>We can check how can we able to setting up mysql server with partition enabled. Lets see what is mysql partition means. <\/p>\n<p>&nbsp;<\/p>\n<p> A partition is a division of a logical database or its constituting elements into distinct independent parts. Database partitioning is normally done for manageability, performance or availability reasons. <\/p>\n<p>&nbsp;<\/p>\n<p> A popular and [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2254"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2254"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2254\/revisions"}],"predecessor-version":[{"id":2256,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2254\/revisions\/2256"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}