Gather workload metadata¶
Note
For MySQL homogeneous migrations, please upload the collections files to Google Migration Center
The workload collection supports MySQL 5.6 and newer. Older versions of MySQL are not currently supported. MariaDB is also not currently supported with this version of the script.
System environment¶
The collection script is designed to run in a Unix or Unix-like environment. It can be run on Windows within either Windows subsystem for Linux or Cygwin. It depends on the following to be available on the machine from which it is run:
bash shell
cat
cut
dirname
grep
locale
mkdir
mysql
sed
tar
tr
which
zip or gzip
Execute collection script¶
Download the latest collection scripts here.
mkdir ./dbma_collector && cd dbma_collector
wget https://github.com/GoogleCloudPlatform/database-assessment/releases/latest/download/db-migration-assessment-collection-scripts-mysql.zip
unzip db-migration-assessment-collection-scripts-mysql.zip
Execute this from a system that can access your database via mysql command line client.
User Creation¶
Please refer to the standalone User Creation guide for instructions on executing collections via administrative accounts or provisioning customized collection users.
Permissions¶
Data collection accesses standard configuration logs and system structures. See the dedicated Permissions file for complete details regarding required global read and process execution privileges.
Execute the collection script with connection parameters:
./collect-data.sh --collectionUserName root --collectionUserPass secret --hostName myhost.example.com --port 25432 --databaseService sys --vmUserName myuser --extraSSHArg "-p" --extraSSHA
rg "12248"
The example above will connect to a database named ‘sys’ on host myhost.example.com on port 25432 as user “root” with password “secret”. It will also ssh as the current user to myhost.example.com, port 12248 to collect information on about the machine running the database.
Parameters
Connection definition must one of:
{
--connectionStr Connection string formatted as {user}/{password}@//{db host}:{listener port}/{service name}
or
--hostName Database server host name
--port Database listener port
--databaseService Database service name
--collectionUserName Database user name
--collectionUserPass Database password
}
Additional Parameters:
--manualUniqueId (Optional) A short string to be attached to this collection. Use only when directed.
VM collection definition (optional):
--vmUserName Username for the ssh session to --hostName for collecting machine information.
--extraSSHArg Extra args to be passed as is to ssh. Can be specified multiple times or as a single quoted string..
Examples:
To collect data for a single database:
./collect-data.sh --connectionStr {user}/{password}@//{db host}:{listener port}/{service name}
or
./collect-data.sh --collectionUserName {user} --collectionUserPass {password} --hostName {db host} --port {listener port} --databaseService {service name}
To collect data for all databases in the instance:
./collect-data.sh --connectionStr {user}/{password}@//{db host}:{listener port}
or
./collect-data.sh --collectionUserName {user} --collectionUserPass {password} --hostName {db host} --port {listener port}
Upload Collections¶
Upon completion, the tool will automatically create an archive of the extracted metrics for upload into the DMA application.
Important
Do not modify the name or the contents of the zip file without consultation from Google.
License¶
Copyright 2026 Google LLC
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.