l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Mar 15 13:29

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] mysql: printing all users and databases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] mysql: printing all users and databases

Peter Jay Salzman wrote:

thanks tim,

i'll give it a try.  i have to say, i'm a little disheartened with
mysql.  i just want it to "work" and be secure.

from reading the docs, it _appears_ (although it doesn't say explicitly)
that not only does each username have a password, each user has a
password for each hostname.  so 'root'@'localhost' may have a different
password than 'root'@'someotherhost'.  that's just too bizarre for my

This is true, and admittedly a little strange. It does offer a choice that wouldn't be available otherwise. What if user@localhost and user@someother host ARE different users, or for somebody's idea of security practices should have different passwords. I'd keep them in sync, but you never know...

it also looks like a database name of "mysql" may refer to the
collection of all databases, but i haven't verified that yet.

plus having anonymous users... really, anonymous.  as in, so anonymous
that they don't even have a username, is a really strange concept.  even
anonymous ftp users have a username of "anonymous".

I don't get what you mean. I have two mysql users: root@localhost and db@localhost. Root can do everything, and db can select, insert, update. Nobody else can login without the username and the password. The annoymous users that come installed by default can be easily removed, and they only have access to databased named 'test_*' anyway.


i wanted to set up a slashcode system, but i may just put that off till
i have more time to sit down and read mysql docs.  the more i learn
about mysql, the more i'm starting to realize there's no possible
quickstart...   :(

The quickstart is there for sure. Quickstart with good security and you 'knowing what's going on under the hood'? Maybe not, but it really is a simple and elegent database system!

i'll give it a few more hours before i put it off as a "major
undertaking" to be attempted when i have less on my plate than i do

i'll try your suggestions.  thanks!


Good luck,

On Mon 15 Mar 04, 9:01 AM, Tim Riley <timriley@timriley.net> said:

On Mon, 2004-03-15 at 04:58, Peter Jay Salzman wrote:

i see how to create new mysql users and new mysql databases, but how
does one print all mysql users on a given host?

Did you try "select * from user"? It's just a guess because the book
says the table exists, but it doesn't appear in my instance. (Maybe
because I've never issued the "grant" command.)

is there something like
an /etc/shadoow for mysql?

how does one print the name of all mysql databases on a given host?

"show databases"

vox-tech mailing list

vox-tech mailing list

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.