你目前可以如下方法:
进入控制面板->服务管理,找到Mysql服务,右键修改属性,改为自启动,以后再重启就没有问题了(除此外还有第三方软件不能禁用mysql的开机启动);
每次登录前,在命令行中,用命令启动:net start mysql
我们可以用show variables like '%secure%'命令显示文件目录
这样将导入文件放在 /var/lib/mysql-files/文件夹下,之后再从这里导入就可以了
导出文件时候,也是将 文件导出到这个文件夹里。
load data infile '/var/lib/mysql-files/part.csv' into table PART fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'
如果显示ERROR 1261 (01000): Row 1 doesn't contain data for all columns
这个错误,是因为数据行不匹配,默认不能有空,用下列命令解决set sql_modul = 0
mysql> select * into OUTFILE 'out.txt' from test.t3 不会锁表:
mysql> show engine innodb status\G
*************************** 1. row ***************************
------------
TRANSACTIONS
------------
Trx id counter 123413
Purge done for trx's n:o < 122897 undo n:o < 0 state: running but idle
History list length 461
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 123412, not started
MySQL thread id 62, OS thread handle 0x7fe5a1337700, query id 1261 localhost root init
show engine innodb status
---TRANSACTION 123410, ACTIVE 108 sec
MySQL thread id 60, OS thread handle 0x7fe5a12f6700, query id 1243 localhost root cleaning up
Trx read view will not see trx with id >= 123411, sees < 123409
--------
mysql> show engine innodb status\G
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 123412, not started
MySQL thread id 62, OS thread handle 0x7fe5a1337700, query id 1264 localhost root init
show engine innodb status
---TRANSACTION 123410, ACTIVE 160 sec fetching rows
mysql tables in use 1, locked 0
MySQL thread id 60, OS thread handle 0x7fe5a12f6700, query id 1263 localhost root Sending data
select * into OUTFILE 'out.txt' from test.t3
Trx read view will not see trx with id >= 123411, sees < 123409
--------
============================
1 row in set (0.00 sec)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)