Databases have been used by humanity for more than 5,000 years. In their purest form, a database is a collection of data or information that is organized or structured in some kind of way. A filing cabinet in an office is an example of a real-world database. Similarly, a computer database is where digital information is stored and organized.
WordPress always uses MySQL as its database management system. Along with Linux, Apache, and PHP, MySQL forms part of the “stack” of four open source software programs that are collectively known as LAMP.
It’s important to remember that MySQL isn’t the database itself, only the tool used to manage, edit, add, and delete the data in the database. If you’re using a web host for your WordPress site, your hosting company will include a specific amount of database storage that is interfaced with via MySQL.
Depending on your web host, there are different ways to install WordPress. Some web hosting companies allow WordPress to be installed by clicking a single button, and this will also include configuring your MySQL database. Other web hosting companies, however may require you to modify the settings of the database, including its address or “hostname.”
The default setting for the MySQL database is “localhost,” which means that the database is hosted on the same computer as the WordPress files. Other web hosts, however, keep their MySQL databases on a different server and thus require a different hostname.
Note: If you’re not sure of the proper hostname for your MySQL database, be sure to inquire with your web hosting company.
Every time anything gets added, deleted, or modified on your WordPress website, this information is stored in the database. Without a database, WordPress would simply not work.