Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
rant1ng45676y@oudalally @bitwise
Just like I suspected, this task took like a whole day.
I was able to export the query into a tab delimited file, but I couldn't find a way to import that same data as inserted new rows, so I gave up
tried to create a console command that would do it, got some weird error where like, half of my data disappears or does'nt get imported
so I'm giving up on that method and going back to importing from tab delimitmed file, with first row being the column labels
what's the command for that?
I tried for literally almost 2 days now to do this myself, lol time to throw in the towel -
rant1ng45676y@Bitwise I just created a php script that converted it to MySQL then imported that on production side
So much time wasted lol, I can't believe not an easier way, either you have to drive into MySQL conf, or just lots of dead ends... Shoulda been Lot of easier.. And the PHP or Python way I tried in the beginning should have worked, just one of those things I guess
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
So, I rarely ask questions, I usually find the answer myself, but, I'm just tired today and maybe my fellow dev ranters can help here.
Is there a way to write a bash script that automatically runs a pre-defined mysql query on local DB and throws that up into production DB?
it's just a simple select and then insert.
Been looking at select into out file, from infile etc
I could do it manually, but I'm going to have to do this more than a few times over the next few weeks and would love to just alias it and be done with it
doesn't seem possible without actually logging into mysql cli each time...on both sides, which sucks
this isn't export/import a table, it's export/import the result of a query
thanks
question
linux
mysql