First, each SQL statement must end with a semicolon.
-- file: test2.sql
create table setting (id integer primary key, status text);
insert into setting values (1, 'new');
Second, when the database and the file "test2.sql" are in the same directory, you can .read the file using only the file name. Double quotes around the file name avoids errors when there are spaces in the file name.
$ sqlite3 test.db
SQLite version 3.8.7.2 2014-11-18 20:57:56
Enter ".help" for usage hints.
sqlite> .read "test2.sql"
sqlite> .headers on
sqlite> .mode columns
sqlite> select * from setting;
id status
---------- ----------
1 new
Using the full path should always work. Double quote full paths, too, if there might be spaces in the file name. The string users/name/test2.sql isn't a full path. Full paths always start with /. (The directory separator in POSIX paths is /; in HFS paths the separator is :.) You should also be aware that some (most?) filesystems are case-sensitive: /users/name/test2.sql and /Users/name/test2.sql are two different things.
You can also read the file using command-line redirection. Again, if the database and the SQL file are in the same directory, you can just use the file name.
$ rm test.db
$ sqlite3 test.db < "test2.sql"
$ sqlite3 test.db
SQLite version 3.8.7.2 2014-11-18 20:57:56
Enter ".help" for usage hints.
sqlite> .headers on
sqlite> .mode columns
sqlite> select * from setting;
id status
---------- ----------
1 new
Finally, check permissions on the SQL file.
$ ls -l "test2.sql"
-rw-rw-r-- 1 mike mike 118 Jan 15 09:28 test2.sql
If you don't have read permissions on the file, you won't be able to open it.
.read /Users/name/test2.sqlselect * from setting;rather thanselect * from question;