Difference between revisions of "MySQL"

Jump to navigation Jump to search
241 bytes added ,  09:06, 7 June 2012
→‎SHOW etc: Renamed to " Maintenance" and added "Corruption"
m (→‎Create Users: Added website script example)
(→‎SHOW etc: Renamed to " Maintenance" and added "Corruption")
Line 217: Line 217:
* The event_scheduler should now be visible in the process list (<code>show processlist</code>)
* The event_scheduler should now be visible in the process list (<code>show processlist</code>)


== SHOW etc==
== Maintenance ==
=== SHOW etc ===
Shows general information about a database, it's tables, columns etc.
Shows general information about a database, it's tables, columns etc.
<source lang="mysql">
<source lang="mysql">
Line 226: Line 227:
SHOW INDEX FROM table;                                # Show tables index/key information
SHOW INDEX FROM table;                                # Show tables index/key information
SHOW CREATE TABLE table;                              # Shows syntax that would be used to recreate a table
SHOW CREATE TABLE table;                              # Shows syntax that would be used to recreate a table
</source>
=== Corruption ===
<source lang="mysql">
CHECK TABLE table;                                    # Checks for table corruption
REPAIR TABLE table;                                    # Repairs a corrupted table
</source>
</source>


Navigation menu