Im currently using a php script to access a database and use the following lines to produce a backup of a table-
Which seems to execute fine and produces no errors except it doesn't actually produce any file. I figured it would produce the file in the same directory as the script or if not in the root directory but neither contains the file.
I then tested the same line in phpmyadmin/mysql which produced user does not have permission to create file.
So im a little unsure as what to do from here, do i need to change permission for the user and if so what access do i need to allow or am i using the 'OUTFILE' function incorrectly?
Any help would be greatly appreciated, note i think the username im using currently has all access permissions-
user_name (Privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE ROUTINE)
Code:
$query = "SELECT * INTO OUTFILE 'test.sql' FROM `default_en_listingsdbelements`"; $result = mysql_query($query);
I then tested the same line in phpmyadmin/mysql which produced user does not have permission to create file.
So im a little unsure as what to do from here, do i need to change permission for the user and if so what access do i need to allow or am i using the 'OUTFILE' function incorrectly?
Any help would be greatly appreciated, note i think the username im using currently has all access permissions-
user_name (Privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE ROUTINE)
Comment