Batch convert miRNA names to Accession IDs?
If you want it all, download the mirRNA.xls.zip file from mirbase here:

ftp://mirbase.org/pub/mirbase/CURRENT/

its a spreadsheet that includes these data as columns and also more information besides - for the entire database.