A database stores information in an organised way so an application can find, sort and update it quickly. MySQL and its close relative MariaDB are the most widely used databases for websites.
What goes in a website’s database
- Posts, pages and products
- User accounts and hashed passwords
- Comments and orders
- Settings
Uploaded images and the application’s code are files, not database content.
The structure
- Database — a container for one application’s data, e.g.
username_wp - Tables — like spreadsheets:
posts,users,options - Rows — one record each
- Columns — fields such as
titleoremail
Users and privileges
An application connects with a database user and password. The user has privileges on specific databases. Give each application its own user with access only to its own database. Managing database users and privileges
On Traxio
- Create databases and users in Account Manager then MySQL Management. How to create a MySQL database in DirectAdmin
- Browse and edit data with phpMyAdmin. How to access and use phpMyAdmin
- Databases count towards your 3GB of disk space.
SQL
Applications talk to databases in SQL:
SELECT title FROM posts WHERE status = 'published' ORDER BY created_at DESC LIMIT 5;
You don’t need to know SQL to run WordPress; it helps when troubleshooting.
Looking for somewhere to run PHP and MySQL? Traxio’s free PHP MySQL hosting includes phpMyAdmin and is free for your first 30 days.
New to Traxio? Hosting is 30 days free with no card needed, then £0.99 a month. See what’s included