SQL Permissions?

Status
Not open for further replies.

scheols

New Member
Messages
47
Reaction score
0
Points
0
Do I have permissions to use SQL function "LOAD DATA INFILE"

Code:
<?php
    include("config.php");
    $load_data = mysql_query("LOAD DATA INFILE 'sql.txt' INTO TABLE `loadata`;") or die(mysql_error());
?>

Access denied for user 'HIDDEN_HIDDEN'@'localhost' (using password: YES)
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
As far as I know we don't restrict any MySQL functions... can you do other queries besides that one?
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
Just a thought, but try using importing the file through phpMyAdmin - that will determine if its an errant restriction on the function.
 

scheols

New Member
Messages
47
Reaction score
0
Points
0
I dont want to use phpMyAdmin, but doesn't matter because I found an alternative so it doesn't matter.
 

scheols

New Member
Messages
47
Reaction score
0
Points
0
Nothing, yet noobs don't know how to use it. So if I made a converter for my forum software why not make it as easy as possible?

Like I said:
but doesn't matter because I found an alternative so it doesn't matter.

Code:
<?php
//copyrighted me(Lamonte/Scheols) 07
	include("config.php");
	$file = fopen("sql.txt","r");
	$content = fread($file,filesize("sql.txt"));
	fclose($file);
	$SQL = explode(";",$content);
	foreach($SQL as $query)
	{
		if(!mysql_query($query))
		{
			die("SQL Error: <br /><em> " . mysql_error() , "</em>");
		}	
	}
?>
 

zero5854

New Member
Messages
126
Reaction score
0
Points
0
oh ok thats pretty neat...was just wondering..I like phpmyadmin only thing i didnt like about it in the past was the db backups but someone since then had made a script for large db dls.
 

scheols

New Member
Messages
47
Reaction score
0
Points
0
well mines is to insert data into DB, after the sql is converted. It will truncate all rows and restore from the converted BB.
 
Status
Not open for further replies.
Top