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. I tried both, MySQL server running and MySQL server stopped (per XAMPP UI). From the command above: -u is the flag that tells MySQL that the next parameter is a username. 1 Answer 1 sudo /usr/local/mysql/support-files/rver stop sudo mysqldsafe -skip-grant-tables mysql -u root ALTER USER rootlocalhost IDENTIFIED. Then launch your terminal and type in the following to open MySQL. The command is executed in /Applications/XAMPP/xamppfiles/bin/, where mysql is located according to the manual, Spotlight, and the "ls" command. First, ensure you have the temporary password created by MySQL when you installed it. Mysql_fix_privilege_tables mysqlbinlog mysqlslap Mysql_fix_extensions mysqladmin mysqlshow Mysql_convert_table_format mysql_zap mysqlhotcopy Mysql_client_test mysql_upgrade mysqldump However, this is not working for me, Terminal says there is no command mysql: Mysql -u username -p databasename < dump.sql. Several sources recommend to import an SQL file in Terminal: In MySQL Database Architecture we covered the fact that MySQL is a client-server based database management system (DBMS). Detailed information regarding installation on macOS can be found in Installing MySQL on macOS. Typing Control-C causes mysql to attempt to kill the current statement. See Installing MySQL on macOS Using Native Packages on how to download and run the installer package, and how to start the MySQL server afterward. Invoke it from the prompt of your command interpreter as follows: mysql dbname Or: mysql -userusername -passwordyourpassword dbname Then type an SQL statement, end it with, \g, or \G and press Enter. PHPMyAdmin fails on that size (it says 128 MB is the maximum, I am well above that). The recommended way for installing MySQL on macOS is to use the macOS installer package. The Problem: I need to import a really large SQL file into MySQL. Version 5.7 came out in October 2015, so if you’ve downloaded it anytime in the last few years it’s most likely after 5.7. The commands you use depend on which version of MySQL you have: either before 5.7 or 5.7 and newer. I hope that I am not asking a stupid question, but I am stuck for hours and making no progress. To start MySQL on Mac, you can use the command line. 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).
0 Comments
Leave a Reply. |