{"id":928,"date":"2013-04-03T01:13:44","date_gmt":"2013-04-03T09:13:44","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=928"},"modified":"2013-04-03T01:13:44","modified_gmt":"2013-04-03T09:13:44","slug":"linode-install-mysql-from-package","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2013\/04\/03\/linode-install-mysql-from-package\/","title":{"rendered":"Linode: Install mysql from package"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p># pacman -S mysql<br \/>\n\tresolving dependencies&#8230;<br \/>\n\tlooking for inter-conflicts&#8230;<\/p>\n<p>Targets (3): libmysqlclient-5.5.30-7&nbsp; mysql-clients-5.5.30-7&nbsp; mysql-5.5.30-7<\/p>\n<p>Total Download Size:&nbsp;&nbsp;&nbsp; 12.81 MiB<br \/>\n\tTotal Installed Size:&nbsp;&nbsp; 123.89 MiB<\/p>\n<p>Proceed with installation? [Y\/n] y<br \/>\n\t:: Retrieving packages from extra&#8230;<br \/>\n\t&nbsp;libmysqlclient-5.5.30-7-x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.4 MiB&nbsp;&nbsp; 129K\/s 00:27 [##################################] 100%<br \/>\n\t&nbsp;mysql-clients-5.5.30-7-x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 834.8 KiB&nbsp;&nbsp; 115K\/s 00:07 [##################################] 100%<br \/>\n\t&nbsp;mysql-5.5.30-7-x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.6 MiB&nbsp;&nbsp; 143K\/s 01:02 [##################################] 100%<br \/>\n\t(3\/3) checking package integrity&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\t(3\/3) loading package files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\t(3\/3) checking for file conflicts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\t(3\/3) checking available disk space&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\t(1\/3) installing libmysqlclient&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\t(2\/3) installing mysql-clients&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\t(3\/3) installing mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [##################################] 100%<br \/>\n\tInstalling MySQL system tables&#8230;<br \/>\n\tOK<br \/>\n\tFilling help tables&#8230;<br \/>\n\tOK<\/p>\n<p>To start mysqld at boot time you have to copy<br \/>\n\tsupport-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 \/>\n\tTo do so, start the server, then issue the following commands:<\/p>\n<p>\/usr\/bin\/mysqladmin -u root password &#39;new-password&#39;<br \/>\n\t\/usr\/bin\/mysqladmin -u root -h li558-80 password &#39;new-password&#39;<\/p>\n<p>Alternatively you can run:<br \/>\n\t\/usr\/bin\/mysql_secure_installation<\/p>\n<p>which will also give you the option of removing the test<br \/>\n\tdatabases and anonymous user created by default.&nbsp; This is<br \/>\n\tstrongly recommended for production servers.<\/p>\n<p>See the manual for more instructions.<\/p>\n<p>You can start the MySQL daemon with:<br \/>\n\tcd \/usr ; \/usr\/bin\/mysqld_safe &amp;<\/p>\n<p>You can test the MySQL daemon with mysql-test-run.pl<br \/>\n\tcd \/usr\/mysql-test ; perl mysql-test-run.pl<\/p>\n<p>Please report any problems with the \/usr\/scripts\/mysqlbug script!<\/p>\n<p>[root@li558-80 ~]# systemctl start mysqld<br \/>\n\t[root@li558-80 ~]# systemctl enable mysqld<br \/>\n\tln -s &#39;\/usr\/lib\/systemd\/system\/mysqld.service&#39; &#39;\/etc\/systemd\/system\/multi-user.target.wants\/mysqld.service&#39;<br \/>\n\t[root@li558-80 ~]# mysql_secure_installation<\/p>\n<p>&nbsp;<\/p>\n<p>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SERVERS IN PRODUCTION USE!&nbsp; PLEASE READ EACH STEP CAREFULLY!<\/p>\n<p>In order to log into MySQL to secure it, we&#39;ll need the current<br \/>\n\tpassword for the root user.&nbsp; If you&#39;ve just installed MySQL, and<br \/>\n\tyou haven&#39;t set the root password yet, the password will be blank,<br \/>\n\tso you should just press enter here.<\/p>\n<p>Enter current password for root (enter for none):<br \/>\n\tOK, successfully used password, moving on&#8230;<\/p>\n<p>Setting the root password ensures that nobody can log into the MySQL<br \/>\n\troot user without the proper authorisation.<\/p>\n<p>Set root password? [Y\/n] y<br \/>\n\tNew password:<br \/>\n\tRe-enter new password:<br \/>\n\tPassword updated successfully!<br \/>\n\tReloading privilege tables..<br \/>\n\t&nbsp;&#8230; Success!<\/p>\n<p>By default, a MySQL installation has an anonymous user, allowing anyone<br \/>\n\tto log into MySQL without having to have a user account created for<br \/>\n\tthem.&nbsp; This is intended only for testing, and to make the installation<br \/>\n\tgo a bit smoother.&nbsp; You should remove them before moving into a<br \/>\n\tproduction environment.<\/p>\n<p>Remove anonymous users? [Y\/n] y<br \/>\n\t&nbsp;&#8230; Success!<\/p>\n<p>Normally, root should only be allowed to connect from &#39;localhost&#39;.&nbsp; This<br \/>\n\tensures that someone cannot guess at the root password from the network.<\/p>\n<p>Disallow root login remotely? [Y\/n] y<br \/>\n\t&nbsp;&#8230; Success!<\/p>\n<p>By default, MySQL comes with a database named &#39;test&#39; that anyone can<br \/>\n\taccess.&nbsp; This is also intended only for testing, and should be removed<br \/>\n\tbefore moving into a production environment.<\/p>\n<p>Remove test database and access to it? [Y\/n] y<br \/>\n\t&nbsp;&#8211; Dropping test database&#8230;<br \/>\n\t&nbsp;&#8230; Success!<br \/>\n\t&nbsp;&#8211; Removing privileges on test database&#8230;<br \/>\n\t&nbsp;&#8230; Success!<\/p>\n<p>Reloading the privilege tables will ensure that all changes made so far<br \/>\n\twill take effect immediately.<\/p>\n<p>Reload privilege tables now? [Y\/n] y<br \/>\n\t&nbsp;&#8230; Success!<\/p>\n<p>Cleaning up&#8230;<\/p>\n<p>&nbsp;<\/p>\n<p>All done!&nbsp; If you&#39;ve completed all of the above steps, your MySQL<br \/>\n\tinstallation should now be secure.<\/p>\n<p>Thanks for using MySQL!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"font-size: medium;\">nano \/etc\/mysql\/my.cnf<\/span>\n<span style=\"font-size: medium;\">-----------------------------------------<\/span>\n<span style=\"font-size: medium;\">[mysql]<\/span>\n<span style=\"font-size: medium;\">default-character-set = utf8<\/span>\n\n<span style=\"font-size: medium;\">[mysqld]<\/span>\n<span style=\"font-size: medium;\">init_connect=&#39;SET collation_connection = utf8_unicode_ci&#39;<\/span>\n<span style=\"font-size: medium;\">character-set-server = utf8<\/span>\n<span style=\"font-size: medium;\">collation-server = utf8_unicode_ci<\/span>\n\n<span style=\"font-size: medium;\">---------------------------------------<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; # pacman -S mysql resolving dependencies&#8230; looking for inter-conflicts&#8230; Targets (3): libmysqlclient-5.5.30-7&nbsp; mysql-clients-5.5.30-7&nbsp; mysql-5.5.30-7 Total Download Size:&nbsp;&nbsp;&nbsp; 12.81 MiB Total Installed Size:&nbsp;&nbsp; 123.89 MiB Proceed with installation? [Y\/n] y :: Retrieving packages from extra&#8230; &nbsp;libmysqlclient-5.5.30-7-x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.4 MiB&nbsp;&nbsp; 129K\/s 00:27 [##################################] 100% &nbsp;mysql-clients-5.5.30-7-x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 834.8 KiB&nbsp;&nbsp; 115K\/s 00:07 [##################################] 100% &nbsp;mysql-5.5.30-7-x86_64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2013\/04\/03\/linode-install-mysql-from-package\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,14],"tags":[],"class_list":["post-928","post","type-post","status-publish","format-standard","hentry","category-hosting","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/928\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}