1.
$ C:\wamp64\bin\mariadb\mariadb10.6.3\bin\mysql.exe -u username -p --default-character-set=utf8
2. 選擇db:
$ use dbname;
3. 匯入資料:
$ source c:\xxx.sql;
匯入大檔案可以用這種方式,phpmyadmin會有上傳大小限制。
後記:
ERROR 1118 (42000) at line 29 in file: 'c:\wamp64\xxx.sql': Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.
=>遇到這個問題解法為
找到my.ini在[mysqld]下面一行加上 innodb_strict_mode = 0