You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by bagsiur <ra...@gmail.com> on 2017/12/19 14:09:17 UTC

Is it possible to import existing mysql database from file in console?

Hi,

My question is: Is it possible to import existing mysql database from file
in console?

In mysql I do: mysql -u myuser -p mydatabase < verybigdatabase.sql

Is it posible to do something similar in apache ignite? How Can I import
existind database to Ignite?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Is it possible to import existing mysql database from file in console?

Posted by dkarachentsev <dk...@gridgain.com>.
Hi,

There are few options:
1) You need to have backups to survive node loss. [1]
2) You may enable persistence to survive grid restart and store more data
that available in memory. [2]
3) Checkout nohup command [3]

[1] https://apacheignite.readme.io/docs/primary-and-backup-copies
[2] https://apacheignite.readme.io/docs/distributed-persistent-store
[3] http://linux.101hacks.com/unix/nohup-command/

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Is it possible to import existing mysql database from file in console?

Posted by bagsiur <ra...@gmail.com>.
Ok, thanks for reply. It's helpful.

I have another question: What about backup? I storage my database in memory,
what happened if Apache Ignite is stopping? Do I lose my data? Haw Can I do
backup and if is nessesery load it to the cluster? Does apache ignite
provide tools for do this, or I must write my own code?

And last question. I run Apache Ignite from console by command
./bin/ignite.sh, when I close my console Ignite is stoping. So, I run Apache
Ignite in tmux session but I'm not sure if this is right way. Is nice to see
console and logs in real time but it is possible to run Ignite like a
deamon? :)







--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Is it possible to import existing mysql database from file in console?

Posted by dkarachentsev <dk...@gridgain.com>.
Hi,

You have a few options here:
1) Write code that scans all tables in MySQL and loads data to grid with
IgniteDataStreamer [1].
2) Write code that parses MySQL CSV and using IgniteDataStreamer loads to
grid.
3) Use existing CacheJdbcStore to preload data from MySQL (check out screen
casts [2] that tell how to do it).

[1] https://apacheignite.readme.io/docs/data-streamers
[2] https://ignite.apache.org/screencasts.html

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/