What are some basic commands to work with SQLite databases?
Many areas of the cPanel product utilize SQLite database due to their portability, speed and reliability. However, sometimes as a server administrator you may need to view or manipulate the database to troubleshoot a problem.
Here are some of the most common or basic commands used for SQLite databases.
Important: If you will be making modifications to the database, we recommend that you always make a backup of the database before proceeding to avoid any unintended data loss.
To enter the SQLite command prompt you can do so as follows:
|This command will list all the available tables in the database. When working with a database, this is helpful to know the tables available.
|Similarly to the tables command, this will display all the tables along with the structure used to build the table. This is useful if you are looking to modify the data or simply understand the structure of the data
|This will test the database for corruption or any other errors.
|This will create a backup of the database in SQLite format.
|For more options refer to the help command
|Finally, this can be used to exit the SQLite command-prompt
All other commands for obtaining data will be very similar to general SQL commands which you can read more about here: