[Nottingham] MySQL question
Mark O'Shea
nottingham at mailman.lug.org.uk
Mon Jan 6 14:32:00 2003
Hi Matthew,
On Fri, 3 Jan 2003, BUNTER MATTHEW wrote:
> All,
>
> I've been given access to a RedHat 7.2 instance (2.4.17) and in particular
> the MySQL server running on that instance. It is the first time I have used
> MySQL that I have not been the root user. The Sys Admin told me to connect
> to the server as so :
>
> $>mysql mysql
>
> This gets me in with no password. I am actually able to change to the mysql
> db and view the user table. I can also connect using just $mysql - I know
> this is very bad but I'm not the one in charge of the server.
>
> I notice that in the user table is the same username I use to connect to
> the instance without a password for either % or localhost. Also there are
> blanks in the user column with no password but with hosts assigned.
>
> SO...
>
> My questions are :
>
> Who am I connecting as using $>mysql mysql?
With this line you are connecting to the local mysql server using your own
username on the machine to the database mysql (which contains all the
privilege tables). You are not being asked for a password because the
administrator has not set one up for your user, but must have given you at
least select privileges for all databases (user table of mysql database
will confirm this) or at least select on the mysql db (database table of
mysql db will confirm this)..
> Who am I connecting as using just $>mysql?
xactly the same as above except that no database is being used as you log
in.
> Are the blank field entries some sort of default guest access?
No, the blank password field is just that, a blank password. Your
administrator has decided that you don't need a password, this is entirely
up to them. But not something I would do as any other user on the system
could log on to the db server using: mysql -u yourusername and not have to
provide a password either. This may be something that you want to clarify
with the administrator so you know that you are using the system like they
want you to.
>
> Regards,
>
> Matt
>
I hope this helps you.
--
Mark O'Shea
mark@musicalstoat.co.uk