Difference between revisions of "Database"
Jump to navigation
Jump to search
(→MySQL) |
|||
Line 3: | Line 3: | ||
== MySQL == | == MySQL == | ||
* [http://dev.mysql.com/doc/ MySQL Reference Manuals] | * [http://dev.mysql.com/doc/ MySQL Reference Manuals] | ||
− | ** [http://dev.mysql.com/doc/refman/5. | + | ** [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. | + | ** [http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html 4.6.7. mysqlbinlog] — Utility for Processing Binary Log Files |
− | ** [http://dev.mysql.com/doc/refman/ | + | ** [http://dev.mysql.com/doc/refman/5.6/en/server-options.html 5.1.2. Server Command Options] |
− | ** [http://dev.mysql.com/doc/refman/ | + | ** [http://dev.mysql.com/doc/refman/5.6/en/server-logs.html 5.3. MySQL Server Logs] |
− | *** [http://dev.mysql.com/doc/refman/ | + | *** [http://dev.mysql.com/doc/refman/5.6/en/error-log.html 5.3.1. The Error Log] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | * [http:// | + | ** [http://dev.mysql.com/doc/refman/5.6/en/privilege-system.html 6.2. The MySQL Access Privilege System] |
+ | *** [http://dev.mysql.com/doc/refman/5.6/en/privilege-changes.html 6.2.6. When Privilege Changes Take Effect] | ||
+ | *** [http://dev.mysql.com/doc/refman/5.6/en/access-denied.html 6.2.7. Causes of Access-Denied Errors] | ||
+ | * [http://hashmysql.org/wiki/Remote_Clients_Cannot_Connect Remote Clients Cannot Connect] - #mysql wiki | ||
− | * http:// | + | *** [http://dev.mysql.com/doc/refman/5.6/en/assigning-passwords.html 6.3.5. Assigning Account Passwords] |
− | * http:// | + | ** [http://dev.mysql.com/doc/refman/5.6/en/describe.html 13.8.1. DESCRIBE Syntax] |
+ | ** [http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html C.5.4.1. How to Reset the Root Password] | ||
=== Commands === | === Commands === | ||
* http://www.pantz.org/software/mysql/mysqlcommands.html | * http://www.pantz.org/software/mysql/mysqlcommands.html | ||
− | + | http://dev.mysql.com/doc/refman/5.6/en/create-user.html | |
− | |||
− | |||
+ | [http://dev.mysql.com/doc/refman/5.6/en/show.html show] databases; | ||
show tables; | show tables; | ||
+ | |||
+ | [http://dev.mysql.com/doc/refman/5.6/en/use.html use] [db name]; | ||
+ | |||
+ | [http://dev.mysql.com/doc/refman/5.6/en/flush.html flush] privileges; | ||
− | + | [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 Syntax] | |
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/] | ||
SELECT CONCAT("SHOW GRANTS FOR '",user,"'@'",host,"';") FROM mysql.user WHERE host!='localhost'; | 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 ; | ||
− | + | === MariaDB === | |
+ | * [http://kb.askmonty.org/en/ MariaDB Knowledge Base] | ||
+ | ** [http://kb.askmonty.org/en/using-mysqlbinlog Using mysqlbinlog] | ||
=== Web interfaces === | === Web interfaces === |
Revision as of 08:08, 15 July 2012
MySQL
- MySQL Reference Manuals
- 4.3.1. mysqld — The MySQL Server
- 4.6.7. mysqlbinlog — Utility for Processing Binary Log Files
- 5.1.2. Server Command Options
- 5.3. MySQL Server Logs
- Remote Clients Cannot Connect - #mysql wiki
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
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 ;
MariaDB
Web interfaces
Admin
Tools
- http://dbdeploy.com/
- http://davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy.html
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."