Firstly: I am quite a newbie: done some minor things with both MySQL and Terminal, but not not in combination (so far, I did everything with PHPMyAdmin).
I hope that I am not asking a stupid question, but I am stuck for hours and making no progress...
The Problem: I need to import a really large SQL file into MySQL. PHPMyAdmin fails on that size (it says 128 MB is the maximum, I am well above that). So I tried Terminal.
Several sources recommend to import an SQL file in Terminal:
mysql -u username -p databasename < dump.sql.
However, this is not working for me, Terminal says there is no command mysql:
192-168-1-6:bin username$ ls ls mysql*
mysql mysql_setpermission mysqld_multi
mysql.server mysql_tzinfo_to_sql mysqld_safe
mysql_client_test mysql_upgrade mysqldump
mysql_config mysql_waitpid mysqldumpslow
mysql_convert_table_format mysql_zap mysqlhotcopy
mysql_find_rows mysqlaccess mysqlimport
mysql_fix_extensions mysqladmin mysqlshow
mysql_fix_privilege_tables mysqlbinlog mysqlslap
mysql_install_db mysqlbug mysqltest
192-168-1-6:bin username$ mysql
-bash: mysql: command not found
The command is executed in /Applications/XAMPP/xamppfiles/bin/, where mysql is located according to the manual, Spotlight, and the "ls" command. I tried both, MySQL server running and MySQL server stopped (per XAMPP UI).
What am I doing wrong? How can I get my SQL file imported? I do not necessarily need to do it with Terminal, but I am just wondering why I can execute the command...
Thank you very much for any advice!