Forum Moderators: phranque

Message Too Old, No Replies

MYSQL - No SQL Query message

MYSQL troubleshooting

         

shady

12:36 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



I have a technical issue that I'm sure everyone who maintains mysql databases will have come across!

When running a large .sql query (e.g. an entire database dump), I receive an error "No SQL Query".

This is not a "Browser Timeout" issue, as I have tried running these SQL files from the unix command line and received the same error. The cause, seems to be due to the .sql file being over a certain size (possibly 2mg).

The only solution I know of, is to chop up the .sql file into lots of smaller ones. I'm sure there must be a better solution.

Any help gratefully received!

danec

2:02 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



Shady,

Are you using phpMyAdmin? If so what version?

shady

4:50 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



Hi Danec

I am using phpmyadmin 2.3.2 against MySQL 3.23.53a however, I also suffer with this error attempting to restore from .sql backups in ssh command line prompt.

shady

6:32 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



Any mySQL experts out there?

jatar_k

6:39 pm on Oct 29, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have to say shady, 3 yrs using mysql and I've never seen that. I looked around mysql.com and this is the best I have come up with

[mysql.com...]

I don't know if that will help or not. I assume you have scoured the .sql file in question to see if it is ok. Have you tried executing each piece individually to make sure they all work?

shady

6:44 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



Hi Jatar

The sql code is an sql dump (using phpmyadmin). I have suffered with this problem loads of times, on different servers etc..

I have moved peoples sites from one server to another and had to dump/restore the data to the new server. Generally, I find no problem until the .sql dump is over 2meg. I then find that the only way to run it is to split the dump into multiple files (e.g. one per table) but even so, with some databases where for example the products table contains over 2000 records, I have to edit the dump for products with notepad to split it into 2 or 3 files before it is small enough to run.

jatar_k

6:53 pm on Oct 29, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



that is painful, have you ever found it documented anywhere?

danec

6:57 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



Shady,

Do a <?php phpinfo();?> and check your upload_max_filesize setting. You may need to change it in php.ini. Sounds like its too small.

andreasfriedrich

7:27 pm on Oct 29, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do a <?php phpinfo();?> and check your upload_max_filesize setting. You may need to change it in php.ini. Sounds like its too small.

That won´t solve the problem danec since I also suffer with this error attempting to restore from .sql backups in ssh command line prompt and a php setting has little bearing on ssh.

BTW I never encountered that problem myself.

Andreas

shady

9:17 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



Hi andreasfriedrich

Yes, I tried ssh and had the same problem!

The closest I can get to a solution, is to use cpanel to backup/restore. This seems to be able to handle much larger dumps, as they are in gzip format, which makes me think that there must be an answer, as it must effectively be gunzipping before executing with no error.

andreasfriedrich

9:33 pm on Oct 29, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know you did try ssh shady, since the part in italics is quoted from what you wrote in msg #3 [webmasterworld.com] :)

Andreas

shady

9:53 pm on Oct 29, 2002 (gmt 0)

10+ Year Member



I'm sure I'll get the hang of "forum subtleties" one day!

NEntropy

4:42 am on Oct 30, 2002 (gmt 0)



When you run the query, do you get the "No SQL Query" error right away? or do you get it after you've ran things for a while?

Some things to try is using different options on phpMyAdmin's backup page (ie, complete inserts... etc), or use a different program to back the server up, like mysqlhotcopy or mysqldump. One of the things I've noticed (I don't know this applies to you, since you've said that you can split your files up) is that phpMyAdmin sometimes creates these crazy sql files in which all the rows in a given table is actually represented in 1 line without any line breaks. Perhaps using different options when backing up will fix the problem.

I have come across a problem similar to yours, but it was because memory module was bad and it was changing some bits of the file at random points. :)