Re: Mysql
- From: houghi <houghi@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Mar 2008 21:11:08 +0200
David Bolt wrote:
There the user can be anybody, including `root` or `mysql_root` or
`anything_you_desire` and there has to be no relation perse between the
users on the system and the users in MySQL.
In a way, there is.
Thus my 'has to be'
That first user has the ability to do anything to
the mysql daemon including creating and "deleting" users, although
"deleting" users is probably the wrong term for it. To delete a user,
you just revoke their access rights using:
The first user can be called 'root', but that is just a name. You could
call the first user 'shirley'. The rights one 'root' user has, has no
impact on the other 'root'. And as both are on the same system, this can
confuse things even more.
Also on a company system, you might have different people that need to
log into the rights that the first user has in mysql, without the
rights.
revoke all on *.* from 'user@hostname';
and then they no longer have access to any of the databases.
I think it is easier to use phpMyAdmin after you have setup the initial
account. That however is a personal choice. There I can see that the
command to remove a user is `DROP USER 'root'@'localhost';`
Sure, disabeling the user is possible, if you want to enable the user
later.
Even worse is that MySQL can work perfectly without the yser 'root' in
MySQL and on some places I read that having 'root' in MySQL could be a
security problem.
I've not read about that, but since I've not been chasing up that much
on mysql, it wouldn't surprise me if I'd missed it. If you can, can you
provide a citation for it?
Uh, my machine where I do not use root as a first user. The reason _I_
have for that is that I do not want to be using root, unless I realy,
realy, realy need it.
Obviously when I did Amarok with MySQL, I got to the page
http://amarok.kde.org/wiki/MySQL_HowTo and all I needed to do was the
following (as I already had a main user)
$ mysql -p -u houghi
CREATE DATABASE amarok;
USE amarok;
GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'pâsswØrd';
FLUSH PRIVILEGES;
and I was ready to go. (Obviously a fake password)
instead of
$ mysql -p -u root
Setting MySQL up is not the most logical thing to do.
Presently it requires entering 2 commands straight after the initial
start-up to set up the "root" users account and password. What's so hard
about that?
It is not hard. It is confusing. Look around on the net about the amount
of people asking the same question. And why not make a small script
around it that does the apropriate test and if not, presents you with
the apropriate questions.
I remember I did many trials and it didn't work, because I misunderstood
what they were saying and because of the confusion of root and root.
Took me a LONG time to figure it out and it certainly held me back a few
years(!) before I delved into it and figured it out.
I tried everey few months and failed again. Finaly I figured it out by
using phpMyAdmin.
Hence bug #347149
Took me a long time to grasp that as well.
And this is the result. As they were already working on it internaly, I
asume they also got a lot of requests from people who were confused as
well.
It is not because it is not hard that it is easy.
houghi
--
houghi http://houghi.org http://www.plainfaqs.org/linux/
http://www.netmeister.org/news/learn2quote.html
.
Today I went outside. My pupils have never been tinier...
- References:
- Mysql
- From: Blattus Slafaly 0/00 ? ? ?
- Re: Mysql
- From: Michael Soibelman
- Re: Mysql
- From: Blattus Slafaly 0/00 ? ? ?
- Re: Mysql
- From: birre
- Re: Mysql
- From: Blattus Slafaly 0/00 ? ? ?
- Re: Mysql
- From: Vahis
- Re: Mysql
- From: Blattus Slafaly 0/00 ? ? ?
- Re: Mysql
- From: Darrell Stec
- Re: Mysql
- From: Blattus Slafaly 0/00 ? ? ?
- Re: Mysql
- From: David Bolt
- Re: Mysql
- From: houghi
- Re: Mysql
- From: David Bolt
- Mysql
- Prev by Date: Re: Mysql
- Next by Date: Re: Mysql
- Previous by thread: Re: Mysql
- Next by thread: Re: Mysql
- Index(es):
Relevant Pages
|