AUTHOR'S MAIN SITE  »  OVERVIEW: client/ server work.

What ARE Database Servers? And how are they managed?

Filename: s0DbSrvGen.htm

This page is "browser friendly". On a "proper" computer, make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a narrow window. With most browsers, pressing plus, minus or zero while the control key (ctrl) is held down will change the texts size. (Enlarge, reduce, restore to default, respectively.) (This is fully explained, and there are more tips, at my Power Browsing page.)

Page contents © TK Boyd, 5/20, Sheepdog Software.

Before I start...

Thank you! "Having" to write this for you may well have been what brought on my "Eureka!" moment.

I've used the MySQL database server in a limited way since at least February 2013. I have installed it a number of times on different machines, under different versions of Windows.

And at least one thing always "niggled". I knew I had something not quite right. But I had it right enough to get what I needed, most of the time.

I hope to save you from that handicap. I struggled with questions that I didn't need to struggle with.

(This next may seem a digression, but it isn't...)

What do you know about the workings of your car? Back when air and fuel was mixed in a carburetor, back before fuel was injected, you may have thought that pressing down on the accelerator "opened up" the gasoline "tap". No. It seemed like that, though, didn't it? In fact, it partially un-(partially)-throttled the pipe letting air in. Pedal down, more air. Pedal up, supply throttled. Hence the name.

The rate of airflow was directly controlled by the pedal under your right foot. Now, when more air flowed, that caused more gasoline to be drawn into the mixture, true. But the pedal controlled the air. Did you know that already? (I drove a car for a very long time before a different activity came along, and I learned more about the inner workings of the engine.)

In a minute... Database Servers... nearly there...

But first, in case you stumbled into this page from someplace other than the material that leads to it,(the basics of servers and services), let me say again: You do not need to install a database server to use LibreOffice Base, or the equivalent part of Open Office. Both come with good embedded database engines. (If you are new to LibreOffice Base, I would encourage you to take the little extra trouble to use the Firebird embedded engine. That is where LibreOffice Base is headed. Why start down a path that dead ends? Although you can, with some work and changes, convert an HSQLB database to one managed by Firebird. Why set yourself up for the hassle?)

Now... What are Database Servers?

First- be sure to use terms correctly. Strictly speaking, a "database" is the "stuff" that you have inside a system that you pull information from with a database manager, or even with just a query that someone set up for you.

You may have a simple computer based personal directory of friends' telephone numbers, in a database. (You can, of course, store that information many ways. But learn to do it with a database manager, and you will be entering a wonderful world of possibilities.)

If someone were to put your telephone numbers into a database, and set up the database manager for you, you'd be able to get at, edit, print out, back up your telephone numbers in a multitude of useful ways.

That would be a simple setup, no obvious division between the different parts of it all.

Eventually though, reasons arise which lead users to want "more". Specifically, they want to arrange for the data to be quite separate from what they use to access and manage it.

Enter "database servers".

One such server is provided by the nice MySQL people. ("MySQL" is also used to refer to a language- the language used to "talk" to MySQL servers. It was so well designed that some other servers have been built to respond to MySQL-the-language. Why reinvent the wheel, when a good one is available?)

If you are sure, sure, sure you know all about what a database server is, and just want the "how do manage a database server" stuff, then you can just jump down to that now. But I would recommend reading at least the first exposition. There's another link for jumping, at the end of that. I thought I "understood" database servers.

Do you worry about what Google Search is? No, you just use it. And what you need to use it is remarkably simple. Think of servers in the same terms... "a useful thing". Only this time you'll need to know how to make your servers work. Oh well.

(From now, I am just going to say "Google" when I mean the "thing" that gives you answers, and links (usually!) to web pages discussing something you wanted to know more about. A small part of what "Google" has grown into.)

Once we get beyond "basic basics", we need to start thinking about "users".Think of a database server as being a bit like Google. It stores stuff. There are ways for users to get that "stuff" out, and they can even be selective about what stuff they pull from the store.

You and I just use Google. We are low power users. But the database behind it, and the necessary management weren't given to us by the pixies. There are other people involved. They are also "users" of the Google database. That is, they are known to the management software. And those users have greater powers that we do. They can change the rules about what links a particular search returns. They tell the management software how to spider the web. They tell it the rules for blacklisting a webpage.

You won't be creating databases on that scale yet. But when you create a server, you will be in charge! By the way: you'll start with just one database, of course, but one server usually serves up more than one database.

Notice I said "one server usually serves up more than one...". Servers, including database servers, are more like people who serve up food than like servants who look after privileged people.

When you create your own database, you are in charge of what fields the tables have. What data goes into the database. What reports are available. Etc.

Of course, someone decides those things for a database which doesn't live on a server, too. But when there's a server, "who does what" becomes more evident. Because...

With a database which is on a server, the idea of "users" becomes more prominent.

Now... In everyday terms, you may well be the only "user" of the server and the database(s) in it.

But I am speaking of "user" in a more narrow sense. The computer world sense.

For some time people with Windows on their computers have been "users" in the computer sense. The careful Windows owner has two "users" on each computer... one with full "admin" powers, one with more limited powers, for everyday work. But few, I would guess, are that careful.

Another place where we are all familiar with being a "user" is online, where we have to log on to websites and services.

Database servers have "users", too. And even if you are the only person with access to your database server, you ought to have at least two "users"... we'll call them "root" and "EverydayPowerful". You will wear (at least) two hats when you use your server. Sometimes you will log in as "root". Not very often, I hope. Sometimes you will log in as "EverydayPowerful". And I would encourage you to have at least one more user: "EverydayLimited".

The user called "root" will be able to do ANYTHING with (or to) the server and the database(s) on it. Including just delete whole databases. The user called "root" will also be able to create new "users", and change what powers users have. "EverydayPowerful" will have whatever powers "root" allowed. I would suggest that at least the power to change users and their powers not be in EverydayPowerful's properties. I would probably allow EverydayPowerful to make almost any change to any database on the server, but not the power to create a new database on the server. EverydayPowerful could, for instance, add (or delete) a field from a table.

And "EverydayLimited" would have even fewer powers. If you are creating a database that you will want to consult frequently, but only alter once in a while, perhaps in a big session of adding a batch of new records, then maybe EverydayLimited would not be allowed to change what is in the databases.

With me so far? If a little uncertain, make that cup of coffee you've been craving, or just stretch your legs, then skim this again from "What are database servers". We've covered a lot of ground, and without much in the way of specifics, which is always hard going.

A quick detail: Every MySQL database has a user called "root". (As do many other servers- database servers and others. It is a widely used name. (Similar to "Admin")). When you create the server, part of that is creating the "root" user. Can you create a second (or more) user with every power? I suspect so, but haven't messed with that yet. Can you rename, or replace "root"? Ditto. Whatever you do, don't strip powers from "root" unless you are certain that you have an alternate user with the same power, across all of the databases on the server. (If you mess up on this, you will have locked yourself out of your server. And MySQL is sufficiently mature that if there was a backdoor "into" it again, that by now would have been discovered, which would have destroyed MySQL's credibility, and brought it down.)

Layers on layers

You will, perhaps, at first hate the people who dreamt up this next twist in the tale. Why did they have make it all so complicated?! But when you get used to it I think you will be grateful. The granularity it allows is stunning.

It's really very simple... **IF** you "let go" of the idea that any of the databases in your server "has a password".

No. The databases don't have passwords. But they are password protected!

All of the databases in the server are only that: Databases in the server.

But the server has "users". Not, by the way, that a server with five users is necessarily used by five people. "One man in his time plays many parts" is very true here.

Users have passwords. And each user has access to one (or more!) of the databases. And the sort of access... what things that "user" is allowed to do to or with that database is set user-by-user. (If you are going to have lots of users... probably assigned to many discrete humans... there is a mechanism... "groups"... which allows you to say "all of these users have these privileges".)

Want to set things up so it looks like each database has its own password? Easy! And maybe a nice "simple to use" starting point. Just don't start thinking that it is the database that "has" the password. Getting into the server as a particular "user" is controlled by a password. Which database, or databases that user can access, what they can do to each of them, is determined by the settings that whoever created the user applied to that user.

Let's say you manage a server for two humans-who-are-not-you. There are two databases on the server, DbPhones, DbAddr. And the two humans using the server are "MrBig" and "MsPA". And MsPA is new, and MrBig doesn't want her to change the data in the databases, but still wants her to be able to look things up. He has to trust you, because he can't be bothered to learn to manage the server for himself.

You, as "root", would tell the server to allow four "users".... MrBPhones, MrBAdd, MsPhones, MsAdd. Each of them would have a different password.

MrB can     MrB can     MsPA can    MsPA can   Database
access      change      access      change

 yes         yes         yes          no       DbPhones
 yes         yes         yes          no       DBAddr

Thank you for not jumping ahead at the earlier chance. If you really didn't even refine a previous understanding, and still wish to jump down to the "how to manage database server now, go ahead. I suppose.

Another twist!

You can do it! You can take it!

Not only can one human be accessing the server as any one of several "users", but the situation can also arise where the password to access the server via a particular "user" is (legitimately!) known to several humans.

Let's say the database is used by a museum as part of a public display. And that members of the public are allowed to interact directly with a PC which has access to the database. And that it crashes fairly often. As long as the user only allowed people who log in with that to look at, but not alter, the data in the database, you could put the instructions for re-launching the software for looking at the database, along with the password for that user on a notice beside the machine. In this scenario, there would also be a user that was able to edit the data... to add new stuff or fix bad data... but the password for that access would be kept secret.

Going back to "What is a database server?"

Shelves of files, SOG

Another way to think of a database server is to imagine it being a bit like a traditional public lending library.

Or better yet, like something similar to a particular specialist library in London... the Society of Genealogists' library.

In that modest building (database server), there are many, many family trees (databases), which, with the help of the librarians (database management software) people who are interested in these things can consult. How much help the librarians will provide, which family trees you can consult, what you can do with the family tree.. copy it? add new information? change old information? delete information(!) (generate report, append records, edit records, delete records) will depend on who you are, what your relationship is with the library and with the family tree in question. (What "user" you can establish yourself as.)

You did it! Congratulations!

Wow! We've covered a LOT of ground. Take a break! You deserve it! And it will also give your sub-conscious a chance to process all that stuff you've taken on board!

After your break, this moves on to...

How are Database Servers managed?

How the database server is managed will depend to a greater or larger extend on what server we are talking about. MySQL comes with an app called "Workbench" which manages the server... perhaps most importantly allows users to be added, and the privileges of users (and groups) to be set up or adjusted. (Workbench can do lots of other things, too.)

If you were wondering about the management of the databases served up by the server, much of what is done to them is done from whatever software is connecting to the server to use the database.

Remember, a single database may be accessed by more than one user (though not always more than one user at a time) and different users may have different privileges. (aka permissions or powers).

Sorry... that's it for now....

Sorry. This is incomplete, and barely proofread. I will get back to it asap. I may be typing as you read this!! If this message is still showing 24 May 20, please write and complain!

When I can get back to this page, do more, I will "tell all"! And what I will discuss, using MySQL as a specific instance, applies to many other "used occasionally" services.

Editorial Philosophy

I dislike 'fancy' websites more concerned with a flashy appearance than for good content. For a pretty picture, I can go to an art gallery. Not everyone has fast broadband.

I present this material in a format aimed at to helping you USE it. There are two aspects to that: The way it is split up, and the way it is posted. Details at my page about how the material is split up and how it is posted.

Please remember the material is copyright. (TK Boyd, 2006 and later) The procedures in the page just cited are suggested only for convenient personal use of the material, however, also....

Feel free to use this information in computer courses, etc, but a credit of the source, quoting the URL, would be appreciated. If you simply copy the pages to other web pages you will do your readers a disservice: Your copies won't stay current. Far better to link to the original pages, and then your readers will see up-to-date versions. For those who care- thank you. I have posted a page with more information on what copyright waivers I extend, and suggestions for those who wish to put this material on CDs, etc. (There is at least one prison using Sheepdog Software/ Sheepdog Guides material for inmate education. Situations do exist where good internet connections are not possible!)

Ad from page's editor: Yes.. I do enjoy compiling these things for you... I hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

  ! Please >>> Click here to visit editor's Sheepdog Software freeware, shareware pages <<< please !  

If you liked this tutorial, see my main webpage for more things from the same author.

How to email this page's editor, Tom Boyd: Editor's email address. Suggestions and questions welcome, but please cite "s0DbSrvGen.htm".

Search across all of my sites with a Google search button. There's one on another of my pages. (It's at the top of the page the link will take you to.)


Use this to search THIS site.... (Go to my other sites, below, and use their search buttons if you want to search them.)

index sitemap advanced
search engine by freefind

Site Map    What's New    Search

The search engine merely looks for the words you type, so....
*    Spell them properly.
*    Don't bother with "How do I get rich?" That will merely return pages with "how", "do", "I"....

Please also note that I have two other sites, and that this search will not include them. They have their own search buttons.

My site.

My site at Arunet.

Valid HTML 4.01 Transitional Page has been tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at Mostly passes.

AND passes... Valid CSS!

....... P a g e . . . E n d s .......