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 – https://www.sqlite.org/cli.html

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

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s