MySQL database "literature", table "user_permissions" ===================================================== field names ----------- fields available in table "user_permissions" description -------------------------------------------- ----------- user_permission_id the unique ID number of this user permission entry user_id the user's unique ID number (which corresponds to the user_id number of the user's record entry within the "users" table) allow_add specifies whether this user is allowed to add records to the database allow_edit specifies whether this user is allowed to edit records in the database allow_delete specifies whether this user is allowed to delete records from the database allow_download specifies whether this user is allowed to download files which are associated with particular records allow_upload specifies whether this user is allowed to upload files to the database allow_details_view specifies whether this user is allowed to view any record details allow_print_view specifies whether this user is allowed to view records in print view allow_browse_view specifies whether this user is allowed to view records in browse view allow_cite specifies whether this user is allowed to build a reference list from selected records allow_import specifies whether this user is allowed to import records into the database allow_batch_import specifies whether this user is allowed to batch import records into the database allow_export specifies whether this user is allowed to export records from the database allow_batch_export specifies whether this user is allowed to batch export records from the database allow_user_groups specifies whether this user is allowed to use the 'user groups' feature allow_user_queries specifies whether this user is allowed to use the 'user queries' feature allow_rss_feeds specifies whether this user is allowed to generate dynamic RSS feeds from any query allow_sql_search specifies whether this user is allowed to execute custom SQL queries via 'sql_search.php' allow_modify_options specifies whether this user is allowed to change his personal data (like name, address or password) allow_edit_call_number specifies whether this user is allowed to fully edit the contents of the 'call_number' field (like the database admin) column types ------------ user_permission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY user_id MEDIUMINT UNSIGNED NOT NULL allow_add ENUM('yes','no') NOT NULL allow_edit ENUM('yes','no') NOT NULL allow_delete ENUM('yes','no') NOT NULL allow_download ENUM('yes','no') NOT NULL allow_upload ENUM('yes','no') NOT NULL allow_details_view ENUM('yes','no') NOT NULL allow_print_view ENUM('yes','no') NOT NULL allow_browse_view ENUM('yes','no') NOT NULL allow_cite ENUM('yes','no') NOT NULL allow_import ENUM('yes','no') NOT NULL allow_batch_import ENUM('yes','no') NOT NULL allow_export ENUM('yes','no') NOT NULL allow_batch_export ENUM('yes','no') NOT NULL allow_user_groups ENUM('yes','no') NOT NULL allow_user_queries ENUM('yes','no') NOT NULL allow_rss_feeds ENUM('yes','no') NOT NULL allow_sql_search ENUM('yes','no') NOT NULL allow_modify_options ENUM('yes','no') NOT NULL allow_edit_call_number ENUM('no','yes') NOT NULL INDEX (user_id) table creation code ------------------- CREATE TABLE user_permissions (user_permission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id MEDIUMINT UNSIGNED NOT NULL, allow_add ENUM('yes','no') NOT NULL, allow_edit ENUM('yes','no') NOT NULL, allow_delete ENUM('yes','no') NOT NULL, allow_download ENUM('yes','no') NOT NULL, allow_upload ENUM('yes','no') NOT NULL, allow_details_view ENUM('yes','no') NOT NULL, allow_print_view ENUM('yes','no') NOT NULL, allow_browse_view ENUM('yes','no') NOT NULL, allow_cite ENUM('yes','no') NOT NULL, allow_import ENUM('yes','no') NOT NULL, allow_batch_import ENUM('yes','no') NOT NULL, allow_export ENUM('yes','no') NOT NULL, allow_batch_export ENUM('yes','no') NOT NULL, allow_user_groups ENUM('yes','no') NOT NULL, allow_user_queries ENUM('yes','no') NOT NULL, allow_rss_feeds ENUM('yes','no') NOT NULL, allow_sql_search ENUM('yes','no') NOT NULL, allow_modify_options ENUM('yes','no') NOT NULL, allow_edit_call_number ENUM('no','yes') NOT NULL, INDEX (user_id)); rules for data import --------------------- - fields are separated by tabs, records are separated by returns (if not specified otherwise within the LOAD DATA statement) - order of fields must resemble the above field order! - DATE format must be YYYY-MM-DD - TIME format must be HH:MM:SS - carriage returns *within* fields (ASCII character 11) must be replaced with a "UNIX return" (ASCII character 10) -> Search for: (\x0B) Replace with: \\n - empty fields are indicated by \N -> Search for: (?<=\t|^)(?=\t|$) Replace with: \\N - character encoding: higher ASCII chars must be encoded as ISO-8859-1 - file encoding must be UNIX load data code -------------- LOAD DATA LOCAL INFILE "/PATH/TO/FILE/user_permissions.txt" INTO TABLE user_permissions; or, alternatively, use something like the following from your shell: mysqlimport --local -u root -p YOUR_DB_NAME "/PATH/TO/FILE/user_permissions.txt"