Re: MySQL permission

From: Timothy Murphy (tim_at_birdsnest.maths.tcd.ie)
Date: 05/26/05


Date: Thu, 26 May 2005 12:39:39 +0100

Dave Uhring wrote:

> If you had bothered to read and implement the instructions presented to
> you after installing the initial database you would not have this problem.
>
> echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
> echo "This is done with:"
> echo "$bindir/mysqladmin -u root password 'new-password'"
> echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
> echo "See the manual for more instructions."

I don't recall getting any such message on my system (Fedora-3).
What exactly do you mean by "installing the initial database"?
I just gave the command "sudo yum install mysql-server".

However, I have set a password for root
on my MySQL server (alfred), and have not had any problems on that score.

On the other hand, I have had problems setting a password for root
on the machine (martha) which I am using to access the server.

I take it the second mysqladmin above is intended for this purpose?
[It seems to me incidentally that there should be some explanation
if two different commands are given.
Are they meant to be alternatives?
Do you consider that to be obvious?]

For some reason that is not clear to me,
I cannot just give the name of the machine "martha" as $hostname,
nor can I give the IP address (192.168.3.6)
although the documentation seems to suggest I can.
I have to give the name "martha.murphy.ie",
the last part being a domain name I invented at some point long ago
when some piece of software required me to give it.
The command "hostname" just returns "martha",
so I am not really sure where MySQL got the "full" domain name from.
However, that is the least of my worries.

Some queries I have.
Are root on the MySQL machine and root@martha.murphy.ie
completely unrelated users, or is there some relation between them?

I have the following conversation on alfred (the server machine):
==========================================
[tim@alfred ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 77 to server version: 3.23.58

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on *.* to tim@martha.murphy.ie
  identified by 'tim';
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye
==========================================

Am I right in thinking that this will give user tim
on the client machine access to everything on the server?

-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland


Relevant Pages

  • Re: RANT ! SP2 !
    ... That's the bottom line and the service pack is only 3 months old and thus well within the tolerance window of not installing it on our systems. ... Open a command prompt. ... Server 2003 SP2 on a computer that is running Windows Small Business ...
    (microsoft.public.windows.server.sbs)
  • Re: MySQL FC3
    ... >> After you get your mysql back up and running, ... > same user that the mysqld server runs as. ... > You can stop the MySQL server by sending a normal kill (not kill ... > cat command; these cause the output of cat to be substituted into the ...
    (Fedora)
  • Re: MySQL Deamon - is it running?
    ... it will show u all the mysql rpms installed on ur pc. ... After installing mysql-server.Give this command to create a root/admin ... the root user of Mysql is different from the root user of FC3. ...
    (Fedora)
  • Re: mysql_connect stops via php
    ... But can you do it from a command line on your web server? ... And if it is another server, can you connect to the MySQL database from the command line there? ... phpinfo() still reported the MySQL ...
    (comp.lang.php)
  • [SLE] Getting MySQL working
    ... I can't get the server to start. ... I tried typing in mysql_install_db and got the following response: ... Installing all prepared tables ... PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER! ...
    (SuSE)