Next, I used ps -ef | grep mysql to check the running processes. Which you can confirm using the jobs command: $ > jobs You should see the trailing & meaning it has now been woken up and is running, just in the background. + Stopped mysql -h$DBHOST -u$DBUSER -p"$DBPASS" & I then used the bg command to move it to the background. + Stopped mysql -h$DBHOST -u$DBUSER -p"$DBPASS" Once this was running, I hit CTRL and Z which then suspended the process. LOAD DATA LOCAL INFILE '/data/part.tbl' INTO TABLE PART FIELDS TERMINATED BY '|' I connected to Amazon Aurora using the mysql client and initiated the load. I use environment variables to hold values such as the DB host, username and password just in case you wonder what the $ values below are. I did find a neat solution to this on StackOverflow which I used as the basis of my solution. I fiddled with using & to kick it off as a background task, and then used nohup to make sure the terminal session would not kill the process, but neither of these approaches worked. My plan was to kick the process off and then move it to the background. Given it was Linux running under the covers, I decided to try a few tricks from the past that had served me well during my days working on Solaris systems. ![]() ![]() I encountered an issue in that the sessions terminate after 20 mins, and I didn’t really want to babysit the sessions to keep ‘tickling’ the session open. One of the things I have been doing this past week is using this to to benchmarking on Amazon Aurora, and part of that means importing/bulk loading a small amount of data (ok, well over 800 million rows). I find myself using this when I need to do sysadmin-y things, and just makes managing your bastion hosts just that bit simpler. Yesterday I was looking to import the TPC-H dataset (some 600 or so million rows) into Amazon Aurora from a workstation that I connect to using AWS Session Manager.ĪWS Session Manager is a great way to simplify your life by allowing you to connect to a machine via the AWS console and not worry about having to manage ssh keys or remembering to lock down external public access from the net.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |