digitalmars.D.learn - Mysql-native - full database backup
- Geert (4/4) Jan 02 2017 Hi!
- crimaniak (3/6) Jan 04 2017 Too common question. Do you have problems with driver usage? Do
- Geert (13/20) Jan 05 2017 Sorry for not being specific, my english it's not quite good. I
- Daniel =?iso-8859-1?b?S2964Ws=?= via Digitalmars-d-learn (21/46) Jan 05 2017 Yep, usin mysqldump is fine I've been using it for a quite time now
- Geert (2/7) Jan 05 2017 Nice function. Thanks!
Hi! How can i create a full database backup using mysql-native for D? https://github.com/mysql-d/mysql-native Thanks!
Jan 02 2017
On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote:Hi! How can i create a full database backup using mysql-native for D?Too common question. Do you have problems with driver usage? Do you have problems with database backup schema?
Jan 04 2017
On Thursday, 5 January 2017 at 01:16:09 UTC, crimaniak wrote:On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote:Sorry for not being specific, my english it's not quite good. I thought i could use a specific mysql-native method (like "execProcedure") for making database backups, but it seems it doesn't have it. Anyway, i ended up using mysqldump with executeShell function: string query = "mysqldump -uroot -ptest_pass test_db > /home/user/mydb_backup.sql"; executeShell(query); For those who use lampp: string query = "/opt/lampp/bin/mysqldump -uroot -ptest_pass test_db > /home/user/mydb_backup.sql"; executeShell(query);Hi! How can i create a full database backup using mysql-native for D?Too common question. Do you have problems with driver usage? Do you have problems with database backup schema?
Jan 05 2017
Geert via Digitalmars-d-learn <digitalmars-d-learn puremagic.com>=20 napsal =C4=8Ct, led 5, 2017 v 3=E2=88=B613 :On Thursday, 5 January 2017 at 01:16:09 UTC, crimaniak wrote:Yep, usin mysqldump is fine I've been using it for a quite time now void synchronizeDatbase(string host, string port, string portDst,=20 string dbName) { import std.process: spawnShell, wait; writefln("Host: %s, DB: %s", host, dbName); auto pid =3D spawnShell("mysqldump --max_allowed_packet=3D1024M -C -h "= =20 ~ host ~ " -P" ~ port ~ " -u" ~ credentials.user ~ " -p" ~=20 credentials.pwd ~ " -R --add-drop-database --skip-triggers=20 --ignore-table=3Dcars.history -B " ~ dbName ~ " |" ~ " mysql -u" ~ credentials.user ~ " -p" ~=20 credentials.pwd ~ " -h 127.0.0.1 -P" ~ portDst); wait(pid); } =On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote:=20 Sorry for not being specific, my english it's not quite good. I=20 thought i could use a specific mysql-native method (like=20 "execProcedure") for making database backups, but it seems it doesn't=20 have it. =20 Anyway, i ended up using mysqldump with executeShell function: =20 string query =3D "mysqldump -uroot -ptest_pass test_db >=20 /home/user/mydb_backup.sql"; executeShell(query); =20 =20 For those who use lampp: =20 string query =3D "/opt/lampp/bin/mysqldump -uroot -ptest_pass test_db >=20 /home/user/mydb_backup.sql"; executeShell(query);Hi! =20 How can i create a full database backup using mysql-native for D?Too common question. Do you have problems with driver usage? Do you=20 have problems with database backup schema?
Jan 05 2017
On Thursday, 5 January 2017 at 21:47:55 UTC, Daniel Kozák wrote:Geert via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> napsal Čt, led 5, 2017 v 3∶13 :Nice function. Thanks![...][...]
Jan 05 2017