Error 29 Hy000 Errcode 13
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Error 13 Hy000 Can T Get Stat Of Errcode 13
Learn more about Stack Overflow the company Business Learn more about hiring developers error 1 hy000 can t create write to file errcode 13 or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Error 13 Hy000 Can T Get Stat Of Errcode 2
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up LOAD DATA INFILE does not work up error 3 hy000 error writing file errcode 28 vote 5 down vote favorite 1 I am running MySQL on my Ubuntu machine. I checked /etc/mysql/my.cnf file, it shows my database temporary directory: ... basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp ... As it shows, my MySQL server temporary directory is /tmp . I have a students.dat file, the content of this file is like following: ... 30 kate name 31 John name 32 error 1148 (42000): Bill name 33 Job name ... I copied the above students.dat file to /tmp directory. Then, I run the following command to load the data from students.dat file to the students table in my database: LOAD DATA INFILE '/tmp/students.dat' INTO TABLE school_db.students FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (student_id, name, attribute) But I got the error message in MySQL console: ERROR 29 (HY000): File '/tmp/students.dat' not found (Errcode: 13) Why mysql can not find the students.dat file though the file is under mysql temporary directory? P.S. The students table is like following (there are already 4 records in the table before run the LOAD DATA INFILE... query): mysql> describe students; +-------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------------+--------------+------+-----+---------+-------+ | student_id | int(11) | YES | | NULL | | | name | varchar(255) | YES | MUL | NULL | | | attribute | varchar(12) | YES | MUL | NULL | | | teacher_id | int(11) | YES | | NULL | | +-------------------+--------------+------+-----+---------+-------+ 4 rows in set (0.00 sec) mysql sql database share|improve this question asked Dec 12 '11 at 8:43 Mellon 9,77246140226 add a comment| 2 Answe
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Error 29 (hy000) File Relay-bin Not Found (errcode 2)
and policies of this site About Us Learn more about Stack Overflow error 29 (hy000): file not found (errcode: 13 - permission denied) the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Mysql Load Data Infile File Not Found Windows
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it http://stackoverflow.com/questions/8471727/load-data-infile-does-not-work only takes a minute: Sign up How to fix ERROR 29 (HY000) in mysql? up vote 3 down vote favorite 1 When I use this command below in Mysql client 5.1 in ubuntu: load data infile 'words.csv' into table words; I'm getting this error: ERROR 29 (HY000): File '/var/lib/mysql/bhuvan/words.csv' not found (Errcode: 2) Help me out. mysql share|improve this question edited http://stackoverflow.com/questions/5515450/how-to-fix-error-29-hy000-in-mysql Apr 1 '11 at 15:29 Nishant 32.5k76994 asked Apr 1 '11 at 15:26 Bhuvan raj 1502415 add a comment| 3 Answers 3 active oldest votes up vote 10 down vote accepted Try load data local infile 'words.csv' into table words fields terminated by ',' enclosed by '"' lines terminated by '\n'; If your words file is in your / directory. share|improve this answer answered Apr 1 '11 at 15:31 k to the z 2,51211440 Worked for me. 'local' is the key word. –Indika K Jun 14 at 8:24 add a comment| up vote 7 down vote For Ubuntu users, Check you currently use: mysql -u user -p --local-infile. Another useful link talking about apparmor configuration. share|improve this answer answered Jan 4 '13 at 14:51 Seb 10114 add a comment| up vote 2 down vote If the file is located on your client machine, you should use this: load data local infile 'words.csv' into table words; share|improve this answer answered Apr 1 '11 at 15:29 Quassnoi 261k50430482 thanks a lot :) –Bhuvan raj Apr 1 '11
2013 by Soraph Recently I had to work with a large amount of data that had to be imported into MySQL via a script after being modified. I've found that using LOAD DATA was the quickest way to do the job. If you are using https://oldwildissue.wordpress.com/2013/12/11/fixing-mysql-error-29-errcode-13-in-ubuntu/ Ubuntu for your server (or you have to work with a server using Ubuntu) you will http://dba.stackexchange.com/questions/55960/mysql-import-csv-file-error-13-hy000-cant-get-stat-of-path-file-csv-errcod find this error when trying to use the query: ERROR 29 (HY000): File '....' not found (Errcode: 13) After few seconds on Google you will find many users that managed to get over the error using the keyword LOCAL, but if you keep your MySQL updated you will see that it will not work as it could generate a security issue in your server. error 1 To overcome this issue there is a simple workaround that require you to modify the MySQL's AppArmor file and define directory where the program can read and write. Be aware that allowing MySQL to read and write in a directory could lead to security problems, always review this kind of changes with a System Administrator. The workaround is really quick: Open the file /etc/apparmor.d/usr.sbin.mysqld as root with your favourite text editor You should see a list of paths where AppArmor allow hy000 can t MySQL to write and read, at the end of this list add the directory where you would like that MySQL will be able to read and write following the pattern used in all the previous entries. For instance: #Other contents /usr/sbin/mysqld { #Other contents /var/log/mysql.log rw, /var/log/mysql.err rw, #Other contents #This will be your dir definition /tmp/ r, /tmp/* rw, #Other contents } Then save and close the file. After you have successfully modified the file it is time to tell AppArmor that it needs to reload the configurations, so as root execute the following command: # /etc/init.d/apparmor reload Then restart MySQL, as root execute the following command: # service mysql restart At this point you have allowed MySQL to write and read contents into your defined directory, only do this if you know what you are doing! I take no responsibility for any damage or data loss caused by a server not correctly secured. Be careful & have fun! Rate this:Share this:Click to share on Twitter (Opens in new window)Click to share on Google+ (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Reddit (Opens in new window)Click to email (Opens in new window)MoreClick to share on Pinterest (Opens in new window)Click to share on Pocket (Opens in new window)Click to share on Tumblr (Opens in new window)Share on Facebook (Opens in new window)Click to print (Opens in new window)Like this:Like Loading... Related Th
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top MySQL import csv file ERROR 13 (HY000): Can't get stat of /path/file.csv (Errcode: 2) up vote 6 down vote favorite 6 I am an absolute beginner to MySQL (5.5.34) / Linux (Ubuntu 12.04 LTS)` I have created a simple database with one table. When trying to import data into it via a 'data_test.csv file an error message 13 appears. Exert from Terminal follows: mysql> source /home/g/stockrecdb/load_test.sql; Database changed ERROR 13 (HY000): Can't get stat of '/home/stockrecdb/data_test.csv' (Errcode: 2) mysql> Note: if using LOCAL in LOAD DATA LOCAL INFILE an error appears: ERROR 1148 (42000): The used command is not allowed with this MySQL version mysql errors csv-file share|improve this question edited Jan 2 '14 at 5:50 asked Jan 2 '14 at 5:17 Guillermo 33114 add a comment| 2 Answers 2 active oldest votes up vote 14 down vote accepted I hope you are using LOAD DATA INFILE. Try to use LOAD DATA LOCAL INFILE instead of LOAD DATA INFILE. Other issue might be this, please visit the following links : MySQL LOAD DATA. When you login in MySQL do like below, abdul@xmpp3:~/Desktop/Jiva$ mysql -uroot -p -