{"id":699,"date":"2012-01-29T13:40:08","date_gmt":"2012-01-29T21:40:08","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=699"},"modified":"2012-01-29T13:40:08","modified_gmt":"2012-01-29T21:40:08","slug":"setting-up-a-debian-box-for-development-making-a-lamp","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2012\/01\/29\/setting-up-a-debian-box-for-development-making-a-lamp\/","title":{"rendered":"Setting up a Debian box for development: making a LAMP: mysql"},"content":{"rendered":"<p>Let&#39;s make a lamp<\/p>\n<p>&nbsp;<\/p>\n<p>First M for Mysql:<\/p>\n<pre class=\"literal-block\"># apt-get install mysql-server<\/pre>\n<p>The script will ask you to define the password for the root mysql user:<\/p>\n<p>Secure your mysql installation:<\/p>\n<p># 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>You already have a root password set, so you can safely answer &#39;n&#39;.<\/p>\n<p>Change the root password? [Y\/n] n<br \/>\n\t&nbsp;&#8230; skipping.<\/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\tERROR 1008 (HY000) at line 1: Can&#39;t drop database &#39;test&#39;; database doesn&#39;t exist<br \/>\n\t&nbsp;&#8230; Failed!&nbsp; Not critical, keep moving&#8230;<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>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!<br \/>\n\t&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#39;s make a lamp &nbsp; First M for Mysql: # apt-get install mysql-server The script will ask you to define the password for the root mysql user: Secure your mysql installation: # mysql_secure_installation &nbsp; NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SERVERS IN PRODUCTION&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2012\/01\/29\/setting-up-a-debian-box-for-development-making-a-lamp\/\"> 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":[14],"tags":[44,191,210,253,300],"class_list":["post-699","post","type-post","status-publish","format-standard","hentry","category-linux","tag-apache_log_dir","tag-installation","tag-lamp","tag-mysql","tag-secure"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/699","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=699"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/699\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}