Forum Moderators: coopster

Message Too Old, No Replies

phpMYAdmin SQL database import error - help!

phpMYAdmin SQL database import error

         

skinfreak

7:52 am on Jan 2, 2003 (gmt 0)



Hi,
I need to import an SQL file that is 3MB in size. I've tried using phpMyAdmin to import it using the SQL tab but get a server error. I cannot get telnet access and so my last hope is to use the $cfg['UploadDir'] string. But how do i use this exactly? I have ftp'd the file to a directory in the phpMyAdmin foolder on the web called backup.
I tried this command in the query box:
$cfg[ '\backup\']
and get this error:
**********************************************************
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unclosed quote @ 6
STR: '
SQL: $cfg[ '\backup\']
Warning: Cannot index a string index in ./libraries/sqlparser.lib.php3 on line 1081
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in ./header.inc.php3 on line 27
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in ./header.inc.php3 on line 28
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in ./header.inc.php3 on line 29
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in ./header.inc.php3 on line 30
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in ./header.inc.php3 on line 32
Database db38851839 running on somesite.co.uk
Error
MySQL said:
Query was empty
******************************
What am I doing wrong? I've tried splitting up the file into smaller chunks, but the chunks that can get uploaded are REALLY small...10Kish....it would take all day to upload that. I have no telnet access either. Help! Thanks
John

[edited by: jatar_k at 6:24 pm (utc) on Jan. 2, 2003]
[edit reason] removed specific site [/edit]

andreasfriedrich

10:33 am on Jan 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I´m using a script like this to import data to a mysql db on a shared host.

<?php
system("/usr/bin/mysql -u%%DATABASE_USERNAME%% -p%%DATABASE_PASSWORD%% -h%%DATABASE_HOST%% %%DATABASE_DATABASE%% < %%DOCUMENT_ROOT%%upload_dir/dump.sql", $fp);
if ($fp==0) echo "Daten importiert"; else echo "Beim Import ist ein Fehler aufgetreten";
?>

Simply replace the %%FIELDS%% with their appropriate values and upload the script. Then request the script.

Andreas