commands used

foo.db contains some data.

./manage.py flush --database=mysql

You have requested a flush of the database.
This will IRREVERSIBLY DESTROY all data currently in the 'django' database,
and return each table to the state it was in after syncdb.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): no
Installed 0 object(s) from 0 fixture(s)

note the 3rd to last line of the traceback. it's using sqlite3 backend instead of mysql.
let's try flushing the default database

./manage.py flush

You have requested a flush of the database.
This will IRREVERSIBLY DESTROY all data currently in the '/genpool0/db/foo/foo.db' database,
and return each table to the state it was in after syncdb.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): no
Installed 0 object(s) from 0 fixture(s)

and try the same command that failed before

./manage.py loaddata --database=mysql ./data.json

Installed 1570 object(s) from 1 fixture(s)

the data was installed back into the default database, instead of the mysql database

In custom code, you are creating a user profile object without specifiying the database, hence it will always use the default database. If you want the user profile being created in the same database as the user, you'll have to add some code to do that specifically in your userprofile app.