Error 29 Hy000 Mysql
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and error hy000 mysql odbc 5.1 driver access denied for user policies of this site About Us Learn more about Stack Overflow the company
Error 2002 Hy000 Mysql
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users error 2002 hy000 mysql centos 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 only takes a
Error 2006 Hy000 Mysql
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 Apr 1 '11 error 1215 hy000 mysql 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| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed! Success! Please click the link in the confirmation email to activate your subscription. 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
here for a quick overview of the site Help Center Detailed answers to any questions you might
Error 2013 Hy000 Mysql
have Meta Discuss the workings and policies of this site About
Error 1148 (42000):
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting mysql load data infile file not found windows ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 http://stackoverflow.com/questions/5515450/how-to-fix-error-29-hy000-in-mysql million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up LOAD DATA INFILE does not work up 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 http://stackoverflow.com/questions/8471727/load-data-infile-does-not-work 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 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 | +-------------------+--------------+------+-
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 https://oldwildissue.wordpress.com/2013/12/11/fixing-mysql-error-29-errcode-13-in-ubuntu/ LOAD DATA was the quickest way to do the job. If you are using Ubuntu for your server (or you have to work with a server using Ubuntu) you will find this error http://board.phpbuilder.com/showthread.php?10393741-RESOLVED-LOAD-DATA-INFILE-mysql-says-file-not-found-but-it-s-definitely-there 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 hy000 mysql 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. 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 error 2002 hy000 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 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 care
but it's definitely there If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: [RESOLVED] LOAD DATA INFILE - mysql says file not found but it's definitely there Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 06-24-2015,11:52 AM #1 sneakyimp View Profile View Forum Posts Visit Homepage Senior Member Join Date Apr 2003 Location Flanders Fields Posts 5,676 [RESOLVED] LOAD DATA INFILE - mysql says file not found but it's definitely there I'm trying to load a CSV file I have generated from PHP into a db table on my workstation. For some reason, mysql is complaining that the file is not found. I am absolutely certain I have specified the path to the file properly and I'm absolutely certain that the file is readable (774). I believe this may have something to do with AppArmor and have edited the config and reloaded it with no luck. Can someone give me a hint about how to get this file imported? I've tried importing it via phpmyadmin which seems to work VERY VERY VERY VERY slowly and keeps timing out. The command: Code: LOAD DATA INFILE '/path/to/digital_raw.txt' INTO TABLE data_digital_raw FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; it returns this error: Code: ERROR 29 (HY000): File '/path/to/digital_raw.txt' not found (Errcode: 13) But I know for a fact the file is there and readable by any user on my machine: Code: $ ls -al /path/to/digital_raw.txt -rw-rw-r-- 1 sneakyimp sneakyimp 30083137 Jun 24 07:53 /path/to/digital_raw.txt I read here about how AppArmor settings can prevent a mysql load for some stupid reason and I've even gone through the trouble of editing the app armor config file: Code: sudo nano /etc/apparmor.d/usr.sbin.mysqld adding this line: Code: /path/to/ r, and then reloading app armor: Code: sudo /etc/init.d/apparmor reload The error persists. I've tried adding the LOCAL option to the mysql command but I get this complaint from mysql: Code: ERROR 1148 (42000): The used command is not allowed with this MySQL version Any help would be truly appreciated. I need to get to work on this data and the file is not even very big (29MB). IMPORTANT: STOP using the mysql extension. Use mysqli or pdo instead. World War One happened 100 years ago. Visit Old Grey Horror for t