MySQL problem: LOAD DATA LOCAL INFILE

leorevenda

Active Member
PartnerNOC
Jan 24, 2004
30
0
156
Hello,

I install cpanel on a new server yesterday, but mysql don't accept LOAD DATA LOCAL INFILE, I tray to configure my.cnf but don't have sucess on activate this option, anybody can help-me?

Error is:

The used command is not allowed with this MySQL version

Cpanel/linux verions:
WHM 10.1.0 cPanel 10.2.0-R82
CentOS 3.5 i686 - WHM X v3.1.0


Thanks

Leo
 

webignition

Well-Known Member
Jan 22, 2005
1,876
0
166
leorevenda said:
Error is:

The used command is not allowed with this MySQL version
The first option may well be to check the MySQL documenation to check what MySQL version is required for the command you are trying to use and check what version of MySQL you are running, and possibly upgrade if necessary.
 

webignition

Well-Known Member
Jan 22, 2005
1,876
0
166
The following page of the MySQL docs includes plenty of info:

http://dev.mysql.com/doc/mysql/en/load-data.html

In particular:
As of MySQL 3.23.49 and MySQL 4.0.2 (4.0.13 on Windows), LOCAL works only if your server and your client both have been enabled to allow it. For example, if mysqld was started with --local-infile=0, LOCAL does not work.
 

leorevenda

Active Member
PartnerNOC
Jan 24, 2004
30
0
156
Thanks, is stranger problem, script and sintax are correct, work normally before we format server and make a reinstall on the new server.

mysql is 4.0.24, upgrade to 4.1.X is good ideia?

Thanks
 

webignition

Well-Known Member
Jan 22, 2005
1,876
0
166
leorevenda said:
mysql is 4.0.24, upgrade to 4.1.X is good ideia?
Since the only version-specific issue I could find in the docs relates to MySQL < 4.1, it is possible that an upgade would sort things out. However this is only a guess.

If you do choose to upgrade, make 112% sure you backup all databases before hand as if something goes wrong, you can't just downgrade from 4.1 to 4.0 and expect things to work.
 

DigitalN

Well-Known Member
Sep 23, 2004
419
1
168
Put a phpinfo() into a cpanel theme directory and view it.
Look at which mysql libraries cpanels php is using.

eg. /usr/local/cpanel/base/frontend/x/phpinfo.php

PHP:
<? phpinfo();?>
--with-mysql=/usr should be seen in the phpinfo()

If not., you might need to recompile cpanels php /usr/local/cpanel/3rdparty/bin/php to use the libraries in /usr.