Question: Can someone help me with this? I keep getting an error and I'm typing it in just the way I'm told. I'm using MySQL 5.7

Can someone help me with this? I keep getting an error and I'm typing it in just the way I'm told. I'm using MySQL 5.7 Command Line Client.

Here is what I'm stuck on:

Enter a LOAD DATA statement that inserts records from the team_stats.txt fi le in your Projects directory for Chapter 7 into the teamstats table. Replace path_to_PHP_folders with the full path for your PHP_Projects directory for Chapter 7. mysql> LOAD DATA INFILE 'path_to_PHP_folders/ Chapter.07/Projects/team_stats.txt'[ENTER ] INTO TABLE teamstats;[ENTER ]

And here is what I typed:

mysql> LOAD DATE INFILE 'C:/Users/Desktop/PHP_Projects(1)/PHP_Projects/Chapter.07/Projects/team_stats.txt' -> INTO TABLE teamstats;

And this is the error that I get:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE INFILE 'C:/Users/Desktop/PHP_Projects(1)/PHP_Projects/Chapter.07/Projects/t' at line 1

So I typed it in the same way but with back slashes instead of forward slashes (which is the way it's supposed to be but my teacher told me to try it the other way)...and this is the error I got:

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

Now I've tried looking this up online AND emailing my professor and neither have been very helpful. Can someone PLEASE tell me how to fix this? I don't have much time!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!