MySQL

MySQL is the most widely used free database in the world, and it is where a website keeps its customers, orders and prices in tidy tables.

Also known as MySQL database MySQL server open source database

Definition

MySQL is where a website keeps what it knows, and it keeps it in tables rather than files in a folder. There is one table for customers, another for orders and another for products, and each has fixed columns. That makes it behave like a careful spreadsheet that will not let anyone type a phone number into the price column. It is free to use and almost every hosting company offers it, Hostrena included, which is why so much of the web sits on it.

The part that earns its keep is the rules between those tables, because an order must belong to a customer who really exists. Try to delete a customer who still has an unpaid invoice and the database can simply refuse, where a spreadsheet would let it through and say nothing. You then find out months later, when a report will not add up and nobody can explain why.

MySQL is quick at the thing websites do most often, which is reading. A product page asks the same short question a few thousand times an hour, and the answer comes back fast. Hiring is easier too, because MySQL has been the default choice for twenty-five years, so whoever takes over your system in three years already knows it.

Now the trap, because it catches good developers as well as owners. MySQL has an old setting called utf8 which, despite the name, does not store every character people actually type. Put an emoji in a customer's name or in a delivery note and the text arrives broken or refuses to save, so the setting you want is called utf8mb4. It is chosen on the day the tables are created, which is why changing it later on a live shop with a million rows means a long night and a held breath. Linkysoft therefore settles the setting before the first table of a project exists.

Two more things are worth saying plainly. Having a database is not the same as having a backup, so ask your supplier when they last restored one and how long it took. A backup nobody has restored is only a guess, which makes it a security question before a technical one. MySQL is not the only choice, since PostgreSQL is stricter and better at heavy reports, but for most shops, clinics and booking sites either will do the job. Linkysoft picks MySQL for plenty of web application work because the hosting is cheap and help is easy to find.

Questions about MySQL

Is MySQL free?
The ordinary version is free to use and nearly all hosting includes it in the price. Oracle also sells a paid edition with extra tools and support, which most small businesses never need.
What is the difference between MySQL and SQL?
SQL is the language you ask questions in. MySQL is one of the programs that understands that language and keeps the data. Several other databases speak the same language.
How many customers can MySQL handle?
Far more than most businesses ever reach. Sites with millions of visitors a month run on it. Trouble usually comes from how the questions are written, not from the database itself.
Do I need to back up the database separately from my website files?
Yes. The files and the database are two different things, and a copy of one without the other will not bring your site back. Check that your backup covers both and that someone has tested a restore.
Can I move from MySQL to another database later?
You can, but it is a project, not a switch. Expect the queries and some data types to be rewritten and everything tested again. It is far cheaper to ask which database you are getting before the work starts.

Still not sure how this applies to your project?

Tell us what you are building and we will answer in plain language.