MariaDB and MySQL FAQ
Get answers to your MariaDB and MySQL questions.
This section provides answers to frequently asked MariaDB and MySQL questions.
How can I access my MySQL Slow Query Logs?
Pantheon logs underperforming database queries using the MySQL Slow Query Log.
To access the log for your database:
Get the SFTP Connection Info for the environment in question.
Replace the word
appserver
withdbserver
in the connection string.Navigate to the
logs
subdirectory to view the MySQL slow query logs.
How can I access MySQL Binary Logs?
These logs are generally not used for development but may be useful to troubleshoot disk quota issues.
To access MySQL binary logs ("binlogs"):
Get the SFTP Connection Info for the environment in question.
Replace the word
appserver
withdbserver
in the connection string.Navigate to the
data
subdirectory to view the MySQL Slow Query logs.
Are table prefixes supported?
Table prefixes are not supported or recommended by Pantheon. While the server will not prevent their creation or use, managing and supporting tables with prefixes is the developer's responsibility.
Can I create a database in addition to the Pantheon database?
No, only one database per site is provided. While creation privileges are granted, any additional database will not survive regular maintenance operations.
Can I put unique tables in the Pantheon database?
Pantheon places no restrictions on the contents of the database.
Can I create another database user?
No, Pantheon only provides one database user. Some customers have asked about creating a read-only user to provide read but not write access to the database. Consider creating an API or JSON-request application to provide access to the required information.
How do I convert output from hexadecimal to a binary data?
When updating your MySQL client (CLI) from 5.x to 8.x, reading data from DB columns with BLOB types (such as the variable
table in Drupal 7.x) may change data from binary to hexadecimal (ex: 0×1f34c9
).
To disable hexadecimal notation, add --skip-binary-as-hex
to the database connection when you connect from the command line:
mysql -u pantheon --skip-binary-as-hex -p02f7b34a02…
For more information on this behavior change, refer to the MySQL 8.0 Reference Manual.
What is the database's maximum connections?
To find the maximum connections available to the site’s database, connect to the site’s database and run:
mysql> SHOW VARIABLES LIKE "max_connections";
There are many other factors that you should consider if you have concerns about maximum database connections. Contact your CSM or Sales for more information.