Difference between revisions of "Database"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
[http://dev.mysql.com/doc/refman/5.6/en/grant.html GRANT] all on userdatabase.* TO 'username'; [http://www.softwareprojects.com/resources/programming/t-how-to-restrict-mysql-user-access-to-a-single-datab-1734.html] | [http://dev.mysql.com/doc/refman/5.6/en/grant.html GRANT] all on userdatabase.* TO 'username'; [http://www.softwareprojects.com/resources/programming/t-how-to-restrict-mysql-user-access-to-a-single-datab-1734.html] | ||
− | + | ||
− | [http://dev.mysql.com/doc/refman/5.6/en/show-grants.html 13.7.5.17. SHOW GRANTS | + | [http://dev.mysql.com/doc/refman/5.6/en/show-grants.html 13.7.5.17. SHOW GRANTS] |
Create command list for showing user grants [http://www.pythian.com/news/1165/creative-sql-how-to-easily-show-grants-for-many-users/] | Create command list for showing user grants [http://www.pythian.com/news/1165/creative-sql-how-to-easily-show-grants-for-many-users/] |
Revision as of 03:50, 21 July 2012
MySQL
- Wikipedia:MySQL
- InnoDB is the default storage engine for MySQL
Commands
Account management
CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass'; GRANT all on userdatabase.* TO 'username'; [1] 13.7.5.17. SHOW GRANTS
Create command list for showing user grants [2]
SELECT CONCAT("SHOW GRANTS FOR '",user,"'@'",host,"';") FROM mysql.user WHERE host!='localhost';
FLUSH privileges;
DB management
SHOW databases; SHOW tables; USE [db name]; 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 ;
Security
Troubleshooting
- 4.6.7. mysqlbinlog — Utility for Processing Binary Log Files
SQLite
MariaDB
Web interfaces
Admin
mysqldump
Tools
- dbdeploy is a Database Change Management tool.
- https://github.com/tanin47/php_db_migrate
- https://bitbucket.org/stepancheg/mysql-diff/wiki/Home
- 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."