Difference between revisions of "Database"

From Things and Stuff Wiki
Jump to navigation Jump to search
Line 25: Line 25:
  
 
=== Commands ===
 
=== Commands ===
 
 
* http://www.pantz.org/software/mysql/mysqlcommands.html
 
* http://www.pantz.org/software/mysql/mysqlcommands.html
  
Line 55: Line 54:
  
 
=== Tools ===
 
=== Tools ===
 +
* [http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html mysqldump]
 +
 
* http://dbdeploy.com/
 
* http://dbdeploy.com/
 
* http://davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy.html
 
* http://davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy.html

Revision as of 01:51, 15 July 2012


MySQL

Commands

show databases;
use [db name];
show tables;
flush privileges;
GRANT ALL ON USERDATABASE.* TO 'USERNAME'; [1]

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 ;

Web interfaces

Admin

Tools

https://github.com/tanin47/php_db_migrate

  • http://dbug.ospinto.com/ - "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