{"id":2322,"date":"2014-08-28T14:20:35","date_gmt":"2014-08-28T14:20:35","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=2322"},"modified":"2014-08-28T14:23:00","modified_gmt":"2014-08-28T14:23:00","slug":"amazon-rds-mysql-experience","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/amazon-rds-mysql-experience\/","title":{"rendered":"Amazon RDS with MySQL &#8211; My Experience"},"content":{"rendered":"<p>Just today I moved one of my client&#8217;s ecommerce databases over to Amazon RDS. All told, the process was only mildly painful. I&#8217;m impressed with the low-cost vs amount of storage, reliability and speed that comes with it.<\/p>\n<p>I ran into two issues while migrating the existing database over to Amazon RDS. The first issue that you run into is that you are not granted &#8220;SUPER user&#8221; privileges. This causes problems when you attempt to create triggers or functions, as it does some kind of logging that requires &#8220;SUPER&#8221; privileges.<\/p>\n<p>No problem though, we can adjust that within the RDS Console.<\/p>\n<h3>Allowing Triggers to be created<\/h3>\n<p>So, once you have your database setup, here&#8217;s are the next steps to all triggers to be created:<\/p>\n<ol>\n<li>In the AWS Console, create a new &#8220;Parameter Group&#8221;.<\/li>\n<li>Change &#8220;login_bin_trust_function_creators&#8221; to 1.<\/li>\n<li>Go to &#8220;Instances&#8221;<\/li>\n<li>Modify your Instance<\/li>\n<li>Choose the &#8220;New Parameter&#8221; group you just created<\/li>\n<li>Restart your instance<\/li>\n<\/ol>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2323\" alt=\"parameter-groups\" src=\"http:\/\/www.sitekickr.com\/blog\/wp-content\/uploads\/2014\/08\/parameter-groups.jpg\" width=\"600\" height=\"168\" srcset=\"https:\/\/www.sitekickr.com\/blog\/wp-content\/uploads\/2014\/08\/parameter-groups.jpg 747w, https:\/\/www.sitekickr.com\/blog\/wp-content\/uploads\/2014\/08\/parameter-groups-300x84.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>Setting up Remote Access<\/h3>\n<p>So, I think for most of us, we&#8217;ll be using RDS as a public database. In that case, you need to identify which servers are able to access the database.<\/p>\n<p>Strangely, this option is not available in the AWS Console, you need to go to the EC2 Console.<\/p>\n<p>https:\/\/console.aws.amazon.com\/ec2\/v2\/home?region=us-east-1#SecurityGroups:<\/p>\n<ol>\n<li>Choose the default security group<\/li>\n<li>Edit inbound rules<\/li>\n<li>Add the IPs of the servers that should be granted access.<\/li>\n<\/ol>\n<h3>Importing your existing database<\/h3>\n<p>Beyond that, migrating the existing database over to RDS was rather simple. A one-liner did the job:<\/p>\n<p>mysqldump -u <em>myLocalUsername<\/em> -p<em>LocalDatabasePassword<\/em> <em>mydatabase<\/em> | mysql -u <em>myAmazonusername<\/em> -h xxxx.us-east-1.rds.amazonaws.com -p<em>MyAmazonRDSPassword<\/em> <em>amazonDatabase<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>Hope that helps!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Migrating a database over to Amazon RDS isn&#8217;t an all day event, but you will run into a couple snags. This post points out two issues that I ran into and quick solutions.<\/p>\n","protected":false},"author":1,"featured_media":2325,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[41,13,1],"tags":[289],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2322"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=2322"}],"version-history":[{"count":2,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2322\/revisions"}],"predecessor-version":[{"id":2326,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2322\/revisions\/2326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media\/2325"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=2322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=2322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=2322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}