So, the question is almost entirely in the title:
I'm running an Android Virtual Machine on a Windows machine and I'm trying to transfer a MySQL database from a XAMPP-phpmyadmin server via a php script and mysqldump to create a new SQLite database on the Android machine. When I run the script, like
$config = parse_ini_file('config.ini');
$dump = shell_exec('mysqldump --user=' . $config['username'] . ' --password=' . $config['password'] . ' --opt users');
I get the SQL dump, which I could echo and receive as a string in Android (I could also write it to a file). But I get the sweats when I think about extracting all the SQL syntax from the output.
So, isn't there a nice little command line script that would do that for me, or any other more convenient way?
EDIT: For clarification: The script should be able to extract just the SQL syntax from the mysqldump output (there's a lot of non-SQL output in there) so I can use the string for an execSQL in Android. I was just wondering: This must have been done before, I don't want to start from primordial ooze here.
EDIT 2: StackOverflow Question Convert MySQL to SQLite links to this page containing mysql2sqlite, which I could use with CygWin to convert; but I can't do it all in a php script, as CygWin can't be used from Windows command line with mysql2sqlite and the dump file as a parameter. Right?