SQLite error: File is not a database

I created a database named database.db

When I created a table in the database, I received an error: Error: File Not a database

nehal@nehal-Inspiron-5559:~/Desktop/UAV$sqlite3 database.db 
SQLite version 3.20.1 2017-08-24 16: 21:36
Enter ".help" for usage hints.
sqlite> CREATE TABLE users(
...> password varchar(10),
...> email text ,
...> name text
...> );
Error: file is not a database

How can I solve the error?

Create a database without a .db extension. For example, sqlite3 user//This will create a database name User

I created a database named database.db

When I created a table in the database, I received an error: Error: File is not a database

nehal@nehal-Inspiron-5559:~/Desktop/UAV$sqlite3 database.db 
SQLite version 3.20.1 2017-08-24 16 :21:36
Enter ".help" for usage hints.
sqlite> CREATE TABLE users(
...> password varchar(10),
...> email text,
...> name text
...> );
Error: file is not a database

How can I solve the error?

Create a database without a .db extension. For example, sqlite3 user//This will create a database name user

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 908 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.