Skip to main content

Problem importing zipped CSV into a database

Comments

1 comment

  • cPanelMichael
    Hello, Here's a quote from one of our Technical Analysts regarding the topic of importing CSV files via phpMyAdmin in a recent support request: In order to import a CSV file using phpMyAdmin, the user using phpMyAdmin must have the FILE permission, which is described below. The FILE privilege gives you permission to read and write files on the server host using the LOAD DATA INFILE and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. A user who has the FILE privilege can read any file on the server host that is either world-readable or readable by the MySQL server. (This implies the user can read any file in any database directory, because the server can access any of those files.) The FILE privilege also enables the user to create new files in any directory where the MySQL server has write access. This includes the server's data directory containing the files that implement the privilege tables. As a security measure, the server will not overwrite existing files. There are two solutions to your issue. 1. As 'root', you have the ability to perform the import, and as such, you can perform the import in WHM -> SQL Services -> phpMyAdmin yourself. There is little risk (that I'm aware of) specific to importing a CSV file. The risk is with giving the user the ability to read and/or write files on your filesystem. 2. The third-party documentation at < Converting a CSV to SQL using 1 line in bash > describes how to convert a CSV file to a .sql file.
    Regarding your other question:
    I've got this message when on the home page of phpmyadmin: Your PHP MySQL library version 5.1.73 differs from your MySQL server version 5.5.54. This may cause unpredictable behavior.

    This topic is discussed on the following thread: Phpmyadmin - PHP MySQL library version Thank you.
    0

Please sign in to leave a comment.