SQL failed to open file error 22

If you're receiving the following error on command line trying to import a SQL file, this post provides a list for likely causes...

"SQL failed to open file error 22"

  • Check you have provided the full path to your file, not a shortcut
  • Ensure the path doesn't contain spaces
  • Remove quotes from your file name

    e.g. the following will produce the 22 error:
     
    SOURCE `C:\database.sql`

    This is correct:

    SOURCE C:\database.sql

Check out this post for more information about setting up SQL on command line.

Sign Up
comments powered by Disqus
Sign Up

Popular Tags

350x250

Need a web developer?

If you'd like to work with code synthesis on your next project get in touch via the contact page.