Difference between revisions of "SQL"
From Organic Design wiki
m (Caretaker: {{#security:*|admin}}) |
(common commands) |
||
| Line 1: | Line 1: | ||
{{#security:*|admin}} | {{#security:*|admin}} | ||
| − | ;Some SQL queries executable by admin | + | == Common MySQL queries == |
| + | ;Insert into interwiki | ||
| + | :<sql>INSERT INTO interwiki (iw_prefix,iw_url,iw_local) VALUES('example','http://www.example.org/$1',0);</sql> | ||
| + | ;Backup and compress DB & FS | ||
| + | :<bash>mysqldump awg -u db --password='password' | 7za a -si backupfile.sql.7z</bash> | ||
| + | :<bash>tar cf - directory | 7za a -si backupfile.t7z</bash> | ||
| + | |||
| + | == Some SQL queries executable by admin (need fixing to work in new MW1.9.3 environment) == | ||
*[{{SERVER}}/wiki/index.php?title=SQL&xpath:/properties:SQL&xpath:/properties/SQL:query=SHOW+TABLES; Tables] | *[{{SERVER}}/wiki/index.php?title=SQL&xpath:/properties:SQL&xpath:/properties/SQL:query=SHOW+TABLES; Tables] | ||
*[{{SERVER}}/wiki/index.php?title=SQL&xpath:/properties:SQL&xpath:/properties/SQL:query=DROP+TABLE+xwHistory; Drop] | *[{{SERVER}}/wiki/index.php?title=SQL&xpath:/properties:SQL&xpath:/properties/SQL:query=DROP+TABLE+xwHistory; Drop] | ||
Revision as of 10:10, 8 May 2007
{{#security:*|admin}}
Common MySQL queries
- Insert into interwiki
- <sql>INSERT INTO interwiki (iw_prefix,iw_url,iw_local) VALUES('example','http://www.example.org/$1',0);</sql>
- Backup and compress DB & FS
- <bash>mysqldump awg -u db --password='password' | 7za a -si backupfile.sql.7z</bash>
- <bash>tar cf - directory | 7za a -si backupfile.t7z</bash>



