I'm trying to load a csv file into mysql using the Load Data Local Infile command in the mysql workbench and I'm getting the errror.
ERROR 1148 (42000): The used command is not allowed with this MySQL version
I added the local-infile=1 line to the my.cnf file, but continue to get the error. Do I need to do something else to be able to load a csv file?
How would I do the following command, with a local file, on a remote database (different machine) ?
$MYSQL_PATH/mysql -u root -h remote.net files -e "
LOAD DATA INFILE '$1'
INTO TABLE $TABLE_NAME
FIELDS TERMINATED BY ','
(size, @d2, @d3, @d4, @d5, path)
The problem seems to be that the INFILE at /tmp/infile.txt is not being recognized remotely.
I'd like to clean up a server that my webmaster let turn into a mess.
I know how to list all files not accessed within the last x days using find and -atime, but what I'm looking for is to come up with a listing of the last access date for files one level down in directory /foo:
/foo/bar1.txt Dec 11, 2001
/foo/bar2.txt Nov 12, 2008
/foo/bar3.txt Jan 12, 2004
For folders one level down in direc
I have a metric boatload of .txt files I'd like to load into a database.
The tables have the same name as the .txt files, but without the extension.
So I'd like to execute the command
for f in *.txt; do mysql -u root -p -e "LOAD DATA LOCAL INFILE '$f' INTO TABLE $f" -D rn4; done
However, the last $f is giving me headaches as I want it to only use the name, not the extension.
So for the file
How do I create a local backup of a remote Amazon RDS MySQL database? What I need to know is how to make a complete full local backup of a MySQL database (not a remote Amazon snapshot) that can be used to restore to a new database anywhere, on any MySQL server (same version of course).
NOTE: I know how to import data from a flat file via MySQL.
I have stack overflow data in an xml file listed below, I want to insert it into mysql database using LOAD XML INFILE , it executes but insert blank/null values in table:
<badges>
<row Id="82946" UserId="3718" Name="Teacher" Date="2008-09-15T08:55:03.923" />
<row Id="82947" UserId="994" Name="Teacher" Date="2008-09-15T08:55:03.957" />
<row Id="82948" UserId="3372" Name=
I need to get the exact filepath, filesize, and date modified and store it in a mysql table.
If I do ls command, it gives me an output that is quite difficult to parse properly to be able to load it into a mysql table.
What would be the best way to get the filepath, size, and date modified and store it in a mysql table (currently, I am using load data infile).
I've changed data directory in /etc/my.cnf.
I've got a MySQL table with a .MYD file of 44GB, and a .MYI file of 34GB. I'm running scripts from the command line that analyze the data in this table. MySQL is not maxing out the CPU, my memory IS maxed, and VMSTAT is reporting that data is being swapped to disk ... but I'm not terribly familiar with this utility and it's reports.
I am running a High Memory Double XL Amazon EC2 Instance.