Difference between revisions of "Database"

From Things and Stuff Wiki
Jump to navigation Jump to search
Line 2: Line 2:
  
 
== MySQL ==
 
== MySQL ==
 +
* [[Wikipedia:MySQL]]
 +
** [http://www.innodb.com/products/innodb/ InnoDB] is the default storage engine for MySQL
 +
 +
* [http://dev.mysql.com/ Developer Zone]
 +
 
* [http://dev.mysql.com/doc/ MySQL Reference Manuals]
 
* [http://dev.mysql.com/doc/ MySQL Reference Manuals]
 
** [http://dev.mysql.com/doc/refman/5.6/en/mysqld.html 4.3.1. mysqld — The MySQL Server]
 
** [http://dev.mysql.com/doc/refman/5.6/en/mysqld.html 4.3.1. mysqld — The MySQL Server]
Line 41: Line 46:
  
 
  SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;
 
  SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;
 +
 +
 +
=== SQLite ===
 +
* [http://www.sqlite.org/ SQLite]
 +
** [http://www.sqlite.org/docs.html Categorical Index Of SQLite Documents]
 +
** [http://www.sqlite.org/lang.html SQL As Understood By SQLite]
  
 
=== MariaDB ===
 
=== MariaDB ===

Revision as of 00:31, 17 July 2012


MySQL

Commands

http://dev.mysql.com/doc/refman/5.6/en/create-user.html
show databases;
show tables;

use [db name];

flush privileges;
grant all on userdatabase.* TO 'username'; [1]

13.7.5.17. SHOW GRANTS Syntax

http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html

Create command list for showing user grants [2]

SELECT CONCAT("SHOW GRANTS FOR '",user,"'@'",host,"';") FROM mysql.user WHERE host!='localhost';
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;


SQLite

MariaDB

Web interfaces

Admin

mysqldump

Tools

  • dBug - "PHP version of ColdFusion’s cfdump. Outputs colored and structured tabular variable information. Variable types supported are: Arrays, Classes/Objects, Database and XML Resources."

Other