Mysql : how to find the line number of error?

Depending how large the .sql file, you could use a program like notepad2 and open the it and it will have syntax highlighting to catch a possible quote mismatch. otherwise, break the statements out in to separate lines if possible. 

Instead of mysql> source mysource.sql # you can use command prompt with --verbose option for more helpful output.


# mysql --verbose test < mysource.sql

No comments:

Write a program in PHP to reverse a number

A number can be written in reverse order. For example 12345 = 54321 <?php   $ num = 23456;   $ revnum = 0;   while ($ num > 1)   {   $...