So I’m very new to this and I’m trying to create a database using sqlite (with the instructions in their documentation). I get this error after the first line of code. Does anyone know what’s going on?
I’m using terminal on OS X Lion.
$ sqlite3 ex1.db
SQLite version 3.7.5
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table tb11(one varchar(10), two smallint);
Error: unable to open database "ex1.db": unable to open database file
Thanks in advance!
Most obvious thing would be lack of permission to write to your current working directory. This is the exact error message I get in that case (too bad it doesn’t bother to include useful information like “permission denied”)
If you have access to
strace, then you can confirm like this:Notice the result of
openisEACCESS (Permission denied).