by Ken Task.
Try:
mysql -u [superuser] -p'[password]' [database4moodle] < [sql_file_name_to_import].sql
Variables in []'s above you adjust - replacing the entire example ... including the []'s.
In your commands, you didn't tell them what database to use on import. ;)
There is no space after the -p and tick/quote the password just in case that password has characters that might confuse your bash shell mysql command.
MySQL/MariaDB, when first installed, should step you through a first time setup of a secure install where you setup a superuser (like root for the OS). Use that 'superuser'.
But ... there is a potential issue ... am not sure a 2.7 of Moodle will run under 7.0.x of PHP.
Think the first version of Moodle that could run under PHP 7.0.x was 3.0.1.
For mimimum PHP requirements see:
https://download.moodle.org/releases/legacy/
and the section on 2.7.x version.
'spirit of sharing', Ken