Open your my.ini or my.cnf file, find the line max_allowed_packet=some_value and change the value to Max_allowed_packet in your MySQL configuration file. With 'show variables like '%max_allowed_packet%' ' you must have MySQL root privilege for executing this command. You may check value of max_allowed_packet File in question must not exceed value specified in that variable. MySQL Server has a max_allowed_packet variable. ![]() If you are trying to load a file which is not present on the users home directory hieararchy, make sure File in question must be readable by all.You may grant FILE privilege to a user with following "GRANT FILE on dbname.* TO ". User who is executing the command must have FILE privilege.So, if your file is located within a user's home directory, assuming username w3r, you must specify Full path name of the file must be specified.If your MySQL server is installed on, file must be present on only. File which you are trying to load must be present in the same host where MySQL server is running.MySQL LOAD_FILE fucntion is several conditions to be met to be executed successfully. Where file_name is a file name with path.įor this example, first we will take a backup of the data of author table using the following command -Ĭode: SELECT * LOAD_FILE('/home/username/myfile.txt')Ībove MySQL command will read file myfile.txt Choose the destination folder to store the backup file from the dialog boxĪnd now you have a dump file of your entire database stored in your destination folder.MySQL LOAD_FILE() reads the file and returns the file contents as a string.If you are connected to the database, Choose Backup… from the File menu.If you are in the welcome screen, click on the backup icon.Choose the destination folder to store the exported file from the dialog box.Īnd now your tables are exported on your destination folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |