Overview
MySQL is a relational database management system (RDBMS) released under the GNU General Public License (GPL). It is one of the most widely used open-source database systems, and is compatible with a multitude of website applications. DreamHost also offers SQLite on DreamHost VPS and Dedicated Servers.
View the following article for instructions on how to add a MySQL database:
You can make changes to your MySQL databases on the MySQL Databases.
MySQL version
Shared MySQL servers, MySQL VPS, DreamPress, and Dedicated servers run MySQL version 8.
Using reserved words in MySQL 8
MySQL 8 includes a list of new "reserved words" (such as 'GROUPS', 'EMPTY', 'RANK', and 'SYSTEM'). These words can be used as table and column names, but require special treatment for use as identifiers, and must be escaped in database queries.
See the following article for more information on how to use reserved words in MySQL 8:
Errors importing a database with mysqlimport
DreamHost has implemented some newer features in MySQL 8, which may cause an error to occur when using the command line program mysqlimport:
mysqlimport: Error: 1227 Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation
The mysqlimport command causing the error may look something like this:
[server]$ /usr/bin/mysqlimport --host hostname --user user --password password --local --fields-terminated-by='|' database /path/to/file
It may also use an options file (recommended) instead, which would look like this:
[server]$ /usr/bin/mysqlimport --defaults-extra-file=/path/to/file --local --fields-terminated-by='|' database /path/to/file
If this error occurs, there is a possible workaround. Using the mysql client instead of mysqlimport will allow this feature to work. Here is an example for the above commands. Keep in mind the table name needs to be specified, where previously mysqlimport determined that from the file name.
[server]$ echo "LOAD DATA LOCAL INFILE '/PATH/TO/FILE' into table tablename fields-terminated-by='|' mysql --host hostname --user username --password password database
[server]$ echo "LOAD DATA LOCAL INFILE '/PATH/TO/FILE' into table tablename fields-terminated-by='|' mysql --defaults-extra-file=/path/to/file
DreamHost's custom modifications for WordPress users
DreamHost has made modifications to its MySQL 8 configuration to provide broader support for most sites and software. The following are default settings in MySQL 8 that have been modified in DreamHost's configuration:
Setting | Default | DreamHost |
---|---|---|
Encryption plugin | caching_sha2_password | mysql_native_password |
Character set | utf8mb4 | utf8 |
Storage engines
The most common storage engines are provided with all DreamHost managed MySQL products. Here is a list of the available storage engines:
mysql> show engines;
Engine | Support | Comment | Transactions | XA | Savepoints |
---|---|---|---|---|---|
CSV | YES | CSV storage engine | NO | NO | NO |
MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
Customers familiar with running their own MySQL server and who wish to use a newer version, may be interested in the trying out DreamCompute which offers multiple newer operating systems to choose from which have newer versions of MySQL available for install.
Comparison of MySQL products
DreamHost shared and VPS products for MySQL run on specialized hardware to optimize disk i/o and therefore the speeds in which they return your query. These are networked products which run independent of the webserver hardware. Dedicated Servers offer MySQL that is optimized for other use cases where the webserver and MySQL server co-existing makes more sense.
Product | Description | Local/Networked | Suitable For Hosting Needs |
---|---|---|---|
Shared MySQL | Included with a Shared Hosting plan, and with a Webserver VPS. | Networked | Standard MySQL for optimized and Shared Hosting appropriate databases. |
MySQL VPS | An additional service similar to a webserver VPS that only runs the MySQL server and no other services. | Networked | High performance MySQL for customers who need higher uptime or have outgrown shared MySQL. |
Dedicated MySQL | A Dedicated Server runs a MySQL server locally along with the other web services. | Local | A Dedicated Server is ideal for software that sends large amounts of data between web applications and MySQL, as there is no network in between to limit throughput. |
MySQL limitations due to Shared Hosting
Not all privileges are available to manage your database due to the nature of Shared Hosting. View the following article for a list of available privileges.
How many databases can my account contain?
There is no limit to the amount of databases, but in general you will have one for each site that requires a database.
Is database encryption supported?
Database encryption is not provided by DreamHost. Please note that if you plan on creating a custom solution to encrypt your database and require root/sudo access to the database server, you would need to purchase a Dedicated Server or DreamCompute. Only on those plans would you have direct access to the database.
See also
- Restore a database in the panel
- How do I manage my database?
- Connect to a database via SSH
- Connecting to a database using a third-party program
- How do I connect to my database using SQLyog?
- Troubleshooting your MySQL database
- Backing up database overview
- Finding your database login credentials
- phpMyAdmin overview
- Optimize a database
- SSH overview