MySQL and SQLite3 with Xampp – Quick start

  1. Open command Shell through Xampp
  2. Navigate to directory your working Xampp directory ie C:\Xampp\htdocs
  3. type sqlite3 to start Sqlite command prompt with temporary database or type sqlite3 file.db to open command prompt with an existing database file.

Quick Commands

  • .exit – exits current database
  • .schema – shows database schema (tables)

Source –

MySql Commands

mysql -u user -p // login to MySQL
show databases;
use database DatabaseName;
show grants;
show tables;
select user(); // shows current user
select user from mysql.user; // shows all users
show grants for 'daunc426anon'@'localhost'; // display grants for specified user
GRANT SELECT ON daunc426_blog.* TO 'daunc426anon'@'localhost' IDENTIFIED BY 'tester';
REVOKE SELECT, INSERT, UPDATE, DELETE ON daunc426_blog.* FROM 'daunc426anon'@'localhost'; // revoke privileges