Se o arquivo estiver acessível por meio de um URL, você poderá fazer: curl 'http://whatever' | mysql -u username -p db_name