MySQL: Difference between revisions

Jump to navigation Jump to search
18 bytes added ,  28 June 2016
→‎mysqldump returning Errcode 13: update source to syntaxhighlight
→‎mysqldump returning Errcode 13: update source to syntaxhighlight
Line 4: Line 4:
When I try to create a CSV file from a table in the database I'd get an Errcode 13. Here I'm trying to extract a table called <span class="package">enc_codes3</span> from a database called <span class="package">testdb</span>
When I try to create a CSV file from a table in the database I'd get an Errcode 13. Here I'm trying to extract a table called <span class="package">enc_codes3</span> from a database called <span class="package">testdb</span>


<source lang="bash" highlight="1">
<syntaxhighlight lang="bash" highlight="1">
mhan@dbserver:~$ mysqldump --tab=./testdump -uroot -p --fields-terminated-by=, --fields-enclosed-by='"' --lines-terminated-by=0x0d0a -t testdb enc_codes3
mhan@dbserver:~$ mysqldump --tab=./testdump -uroot -p --fields-terminated-by=, --fields-enclosed-by='"' --lines-terminated-by=0x0d0a -t testdb enc_codes3
Enter password:
Enter password:
mysqldump: Got error: 1: Can't create/write to file '/home/mhan/testdump/enc_codes3.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'
mysqldump: Got error: 1: Can't create/write to file '/home/mhan/testdump/enc_codes3.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'
</source>
</syntaxhighlight>


Make sure that the mysql daemon (mysql:mysql on Ubuntu) is able to write to the folder.
Make sure that the mysql daemon (mysql:mysql on Ubuntu) is able to write to the folder.

Navigation menu