I have solved my problem with MySQL and MySQLdb. The problem was: > I have installed mysql-3.23.52 as part of the Gentoo Linux > distribution. I am accessing MySQL via mysql-python AKA MySQLdb > which calls the MySQL C API. During testing I start MySQL using > "safe_mysqld" and shutdown MySQL using "mysqladmin -u root > --password=xxxxxxxx shutdown".
> When I do a "LOAD DATA LOCAL INFILE" via MySQLdb, I get the > well-known error message 1148: "The used command is not allowed > with this MySQL version". 1. Add to mysql-3.23.52.ebuild the line myconf="${myconf} --enable-local-infile" It goes in the src_compile() section. Do an "emerge dev-db/mysql" to rebuild MySQL. 2. Recompile mysql-python (which contains MySQLdb). I suspect the segfaults I was having were due to library mismatches. Therefore build MySQLdb after MySQL. 3. Add "local-infile" to "/etc/mysql/my.cnf" in the groups [safe_mysql], [mysqld], and [mysql]. Do not add it to the group [client]. 4. At some point the MySQL GRANT system was changed. Now GRANT FILE ON my_database.* TO abcdefgh@localhost IDENTIFIED BY 'xxxxxxxx'; does not work. One must use: GRANT FILE ON *.* TO abcdefgh@localhost IDENTIFIED BY 'xxxxxxxx'; Note that now abcdefgh can access any file on any database. I wish I could use "LOAD DATA LOCAL INFILE" is a more secure manner. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php