---
title: "mysql备份表数据"
author: "dingjun1"
date: "2008-03-19T18:45:52Z"
tags: []
slug: "mysql"
draft: false
lastmod: "2008-03-19T18:45:52Z"
id: 173866
url: "https://dingjun1.iteye.com/blog/173866"
---

MYSQL5 ：
使用下面的语句导出表里的记录，结果出错：Can't create\write to file *
>mysql -u root -p
>use jlx

>select * into outfile 'c:\tbl_line.txt' from tbl_line;

结果是root用户没有权限创建文件,我想MYSQL\DATA目录下总有权限创建吧
改成：>select * into outfile '../data/tbl_line.txt' from tbl_line;

结果显示：Query Ok, 7 Rows affected