I have been running a 2.7 database on shard hosting and want to move it to my home server.
First I installed Debian 9, then Apache, MySql and PHP 7. The MySql turned out to be Mareia DB but I had an empty Moodle. I dumped the Moodle database and moved Moodledata to another area - so I could restore the install later if required.
I dumped the database on the host and ftped the Moodledata directory to replace the moodledata directory on my machine. I then tried restoring the hosted database to my new install.
Command 1: mysqlimport -umoodleuser -p moodle hosted.sql
mysqlimport: Error: 1045, Access denied for user 'moodleuser'@'localhost' (using password: YES), when using table: hosted
Password and user were correct as I can log in to the database.
I then tried within mysql
mysql -umoodleuser -p moodle < hosted.sql
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql - moodleuser - moodle < hosted.sql' at line
Can anyone see what I am doing wrong?
r