Assist Support Guide
Requirements
MySQL WorkBench
Access to the Assist server.
Hosted Systems
All hosted systems are documented in SharePoint, along with users and passwords.
You must have access to the SharePoint to read this document.
Updating Data En Mass
By default, MySQL will not allow updating of data without explicit WHERE or LIMIT clauses. To enable this:
- Go to "Edit/Preferences"
- Choose "SQL Editor" Under "Query Results"
- Check "Safe Updates"
- Restart MySQL WorkBench.
Warning: You will then be able to (for example) delete all data inadvertently, so enable this option with care.
Viewing BLOB fields
By default, MySQL WorkBench displays all text fields as "BLOB", which you must then right-click and choose "Open Value in Editor". To enable viewing the text directly in the results, do the following:
- Go to "Edit/Preferences"
- Choose "SQL Editor" Under "Query Results"
- Check "Treat BINARY/VARBINARY as nonbinary character string"
- Restart MySQL WorkBench.
Note: Enabling this option comes with a performance hit - some text fields contain the entire page data, so enable this with care.
Recovering passwords from MYSQL Workbench
First go check where your encrypted file is. Usually it is stored at %AppData%\MySQL\Workbench\workbench_user_data.dat
If different, amend the commands below.
Use Powershell
Add-Type -AssemblyName System.Security $cipher = Get-Content $env:APPDATA\MySQL\Workbench\workbench_user_data.dat -Encoding Byte -Raw $scope = [System.Security.Cryptography.DataProtectionScope]::CurrentUser $mysqlpwd = [System.Security.Cryptography.ProtectedData]::Unprotect( $cipher, $null, $scope ) [System.Text.UTF8Encoding]::UTF8.GetString($mysqlpwd)
Common Queries
-- Assist SQL -- Find the page ID SELECT * FROM obs_assist.obs_page WHERE PAGE_TITLE LIKE '%SDD_366558%'; -- Find all revisions (to change comments) SELECT * FROM obs_assist.obs_revision where rev_page IN (SELECT page_id FROM obs_assist.obs_page WHERE PAGE_TITLE LIKE '%SDD_366558%' ); -- Find unpatrolled pages to set them patrolled SELECT * FROM obs_assist.obs_recentchanges where rc_patrolled = 0; UPDATE obs_assist.obs_recentchanges SET rc_patrolled = 1 where rc_user_text = 'StylesC' and rc_patrolled = 0; -- Check the logs for details of PDF production SELECT * FROM mts_assist.oh_logging where log_action ='PdfBook' order by log_id desc; -- For v1.34 and later, comments have changed: SELECT log.*, CONVERT(comment.comment_text USING utf8) comment FROM epod_assist.epodlogging log left join epod_assist.epodcomment comment on comment.comment_id = log.log_comment_id where log_action ='PdfBook' ORDER BY log_id DESC LIMIT 20;
Assist Database Backup
Backup each database separately.
Use MySQL Administrator Data Export option.
Always check boxes as follows:
- Dump Stored Procedures and Functions
- Dump Events
- Dump Triggers
- Export to Self-contained File
- Name with the name of the Assist on the start of the dump.
- Include Create Schema
Advanced Options button
- Comments
- Create-options
- quote-names
- lock-tables
- dump-date
- disable-keys
- tz-utc
- add-locks
- extended-insert
Start Export
Assist Database Restore
If required, drop the database from MySQL Administrator:
- On Schema explorer, right click on schema and select Drop Schema.
Use MySQL Administrator Data Import/Restore option.
- Import from self-contained file
- Select the database backup dump
- Click Start Import
- Refresh the schema explorer when done - the database should be present.
Restore database users, passwords and permissions when complete.
Will need to create the assist owner with username and password from LocalSettings.php
- From MySQL Admin Management Explorer
- Users and Privileges
- Add Account
- Login Name and Password - as per LocalSettings.php
- Administrative Roles tab - check DBA, which checks everything
- Schema Privileges - add entry
- Selected Schema
- Check everything (click Select 'ALL' button)
- Click Apply
Normal Assist users will need to be reset either by the users through 2FA, or through #Resetting User Passwords.
Resetting User Passwords
From command line:
C:\xampp\php\php.exe C:\xampp\htdocs\calidus-assist\{wikiname}\maintenance\changePassword.php --user={uname} --password={pwd}
Upgrading a Wiki from 1.16 Upwards
The following is a checklist of actions.
{SYSTEM}
- Extracted - INCOMPLETE
- DB Import - INCOMPLETE
- DB User - INCOMPLETE
- {SYSTEM}_owner/{PASSWORD}
- Version 1.31.6 - INCOMPLETE
- Move old extensions to old folder - INCOMPLETE
- Recreate LocalSettings.php
- Update password sender and emergency contact
- Version 1.34.4 - INCOMPLETE
- Leave LocalSettings.php
- May need to remove some extensions like numberformat and variables
- Version 1.39.8 - INCOMPLETE
- Leave LocalSettings.php
- New Extensions and files - INCOMPLETE
- Overwrite MW-add-files - INCOMPLETE
- LocalSettings.php - INCOMPLETE
- require_once "$IP/LocalSettingsAdditional.php";
- Gadgets and MediaWiki css/js hacks - INCOMPLETE
- Import MW-hacks.xml file - INCOMPLETE
- Templates - INCOMPLETE
- Import MW-Templates.xml - INCOMPLETE
- Additional Files - INCOMPLETE
- C:\Users\twalker\OneDrive - Aptean-online\Documents\Work\Assist\OBS Templates Export
- Aptean_Logo.png
- Attention_niels_epting.png
- Bulbgraph.png
- C:\Users\twalker\OneDrive - Aptean-online\Documents\Work\Assist\OBS Templates Export
- Users - INCOMPLETE
- admin/Liverpool123
- anw/Liverpool123
- Problems
- NONE
Creating a Brand New Wiki
The following is a checklist of actions.
- Copy version 1.39.8 to a WIKI name - INCOMPLETE
- Create LocalSettings.php
- xxx_owner with appropriate password
- Note the password!
- New Extensions and files - INCOMPLETE
- Overwrite MW-add-files - INCOMPLETE
- LocalSettings.php - INCOMPLETE
- require_once "$IP/LocalSettingsAdditional.php";
- Gadgets and MediaWiki css/js hacks - INCOMPLETE
- Import MW-hacks.xml file - INCOMPLETE
- Templates - INCOMPLETE
- Import MW-Templates.xml - INCOMPLETE
- Additional Files - INCOMPLETE
- C:\Users\twalker\OneDrive - Aptean-online\Documents\Work\Assist\OBS Templates Export
- Aptean_Logo.png
- Attention_niels_epting.png
- Bulbgraph.png
- C:\Users\twalker\OneDrive - Aptean-online\Documents\Work\Assist\OBS Templates Export
- Users - ensure that there is at least an Admin user with full user rights. Note the password:
- Log in as administrative user
- Special:Create Account
- Create admin account - note the password.
- Special:User Rights
- Check Administrator, Interface Administrator, Bureaucrat and Suppressor
- Save user groups
Extracting Hacks
- Extract from MTS Assist
- Special Pages
- Export Pages
- Add the pages specifically below
MediaWiki:Common.js MediaWiki:Group-user.css MediaWiki:Common.css MediaWiki:Vector.css MediaWiki:Timeless.css MediaWiki:Gadget-veCenterLoader.js MediaWiki:Gadget-autonum MediaWiki:Gadget-autonum.js MediaWiki:Gadget-autonum.css MediaWiki:Gadget-veCenterLoader MediaWiki:Gadget-veCenter.js MediaWiki:Gadgets-definition
- Ensure the following are checked/unchecked:
- Include only the current revision, not the full history - CHECKED
- Include templates - UNCHECKED
- Save as file - CHECKED
- Export to MW-hacks.xml
Extracting Templates
- Extract from MTS Assist
- Special Pages
- Export Pages
- Add the pages specifically below
Template:DocLink Template:Doc_Title Template:Comment Template:Incomplete Template:Note Template:Warning Template:Xref PageTemplate DocTemplate
- Ensure the following are checked/unchecked:
- Include only the current revision, not the full history - CHECKED
- Include templates - UNCHECKED
- Save as file - CHECKED
- Export to MW-Templates.xml
Extracting Common Additional Files
Take the following from an Assist implementation that has them:
Aptean_Logo.png Attention_niels_epting.png Bulbgraph.png
- Special:All Pages
- Enter start of file name in "Display pages starting at:"
- Select File Namespace from drop-down list and then click Go.
- Click on the file until a full-screen version appears.
- Right-click, Save Image As
- Save to your chosen directory.
Importing Additional Files, Templates and Hacks into a Wiki
- Ensure that all additional files from MW-add-files have been added.
- Upload additional files:
- Special:Upload Multiple Files
- Add a description if you want
- Select the following files:
Aptean_Logo.png Attention_niels_epting.png Bulbgraph.png
- As soon as you select the files, the files will be uploaded. The page will indicate if there is any error uploading the files (for example if they already exist)
- Upload hacks and templates:
- Special Pages
- Import Pages
- Browse for the file to import, one of (do both)
- MW-hacks.xml
- MW-Templates.xml
- Set InterWiki prefix to the name of the Wiki e.g. MTS, Portal, CTLTMS, etc
- Add a comment if you want.
- Ensure option "Import to original namespace" is selected
- Upload File.