今日偶然要导一张数据表至mysql数据库中,但发现文件为2.9M,导入失败。
看一下返回的错误原因为文件超过2M的大小限制,郁闷。
找了一下“越狱”的方法,需要修改php.ini和phpmyadmin的配置,按图索骥,结果发现linux中找不到
文章中所述的配置文件,气愤啊。
突然想起来这个限制可能是phpmyadmin造成的,并非MySQL不允许上传或导入啊。直接打开终端命令行:
[email protected] ~/桌面 $ mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 228
Server version: 5.5.34-0ubuntu0.12.10.1 (Ubuntu)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
顺利登入。
mysql> use isuzu_database;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source ~/下载/t_product_store.sql;
...
Query OK, 279 rows affected (0.00 sec)
Records: 279 Duplicates: 0 Warnings: 0
Query OK, 188 rows affected (0.01 sec)
Records: 188 Duplicates: 0 Warnings: 0
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
成功!
有时候换个角度会有意想不到的惊喜,:P