Use following command:
ssh-keygen -t rsa
where
-t: specifies type of key to create
rsa: is a type to create You can to check more options by using man command.
man ssh-keygen
mysqldump -u username -p -v school_old > old_db_dump.sql
mysqladmin -u username -p create school_new
mysql -u username -p school_new < old_db_dump.sql
String content = "Convert string to inputstream";
ByteArrayInputStream stream = new ByteArrayInputStream(content.getBytes());