[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] MySql database setup (help out my Cobalt hoster)



On Fri, 25 May 2001, Cubicware admin wrote:

> I've purchased several domains from a Cobalt hosing user. So far so good.
> I've asked him to add some MySql databases for me - but unfortunately either
> he doesn't quite know how to do it or I dont quite know what to ask him.
> Perhaps if it wouldn't be to much trouble would someone mind posting the
> mysql commands that he will need to run in order to set up a database on his
> server that I will be able to then login to and create tables and data and
> so on from localhost and remotely (web app)?  I understand what I need to do
> once I have access, but I am not sure how to do the server side setup. On
> another hosting company I use, I just asked for a database and they gave me
> a userid and password and I was all set.
> 
> John

Obviously that people here will send you to the docs at mysql.com.

I personally dislike these docs, because MySQL is something complicated
*as it is* and from a weird reason they don't even have *1* practical
answer to the simple question you asked (and so did I... months ago).

So I asked someone on IRC to explain me some more about these permissions.

This is how it goes:

There are databases; in the databases there can be many tables.
There are MySQL users; Those are not the machine's users. It's a seperate
list.
Every MySQL user has MySQL permissions. GLOBAL MySQL permissions. That is
the permission he has to "alter table" is to alter ALL the tables on that
MySQL server.

You NEVER want that.

There are *database permissions for a specific user* - meaning,a user,
which appears in the MySQL users' database, is granted access (after s/he
logins with his/her password) to a database, and can do whatever s/he
wants in that database, unless access to the database itself was not given
as well fully.

If you understood all that - great. If not - nothing to worry about.

About configuring MySQL for you... obviously the guy on the hosting
doesn't know how to use MySQL commands so I won't bother.

Tell him to install the RPM for WebMin (downloadble from www.webmin.com)

After he installs it (rpm --install -v filename.rpm)

He should type, in his browser: http://www.server.com:10000

Login with user "root" and his root password to the machine.
Go to Servers
Go to MySQL

Add desired databases names.
Add desired users, and give NO PERMISSIONS to these users.
Go to "Database permissions" - add there, add a user with access from
localhost to ALL permissions.

Tell webmin to have mysql reload the configuration - and you're done.

Hope I didn't miss anything... If I had, ask again :)

- shimi.