Hi Nils,

So if I su to root and try to start mysql, I get the following... does that
mean I'm secure?  I am still finding the very confusing, but doing my best
to look it up on dejanews and in books etc so as to not stress this group
too much.

[root admin]# mysql
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
[root admin]#

Kind regards,

Alan.


> Hi  ???,
>
> O.K let's translate this.
>
>
> [admin admin]$ ps -u mysql
> >   PID TTY          TIME CMD
> > 11096 pts/0    00:00:00 mysqld
> > 11098 pts/0    00:00:00 mysqld
> > 11099 pts/0    00:00:00 mysqld
> > [admin admin]$
>
> This shows you the proceses for the Linux user account "mysql".
>
> You can see this account with
>
> cat /etc/passwd
> cat /etc/group
>
>
> The left side tells you that the script runs under the Linux User account
> "mysql".
>
> Don't mix this up with the mysql user accounts which your mysql cliens are
> using to connect to the mysqld (server) process.
>
> This means everything is alright.
>
> However...
>
> ----
>
> If you want to use another Linux user account than you will have to create
it,
>
> useradd  xxxx
> passwd xxxx
>
> You will also need to chnage the user and usergrp.
>
> go to the database directory f.e.
>
> cd var/lib/mysql
>
> chown -R xxxx *
> chgrp -R xxxxgroup *
>
> I hope that should make it clearer.
>
>
> Best regards
>
> Nils Valentin
> Tokyo/Japan
>
> 2003年 5月 30日 金曜日 16:49、2Hosts.com さんは書きました:
> > Hi Nils,
> >
> > I tried what you said, here's what I got. Apologies in advance if I'm
being
> > a "slowbee" as well as a "newbie"/
> >
> > [admin admin]$ ps -u
> > USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
> > admin     9449  0.0  0.1  1700  936 pts/0    S    00:48   0:00 -bash
> > admin    13234  0.0  0.1  2336  700 pts/0    R    01:49   0:00 ps -u
> >
> > [admin admin]$ ps -u mysql
> >   PID TTY          TIME CMD
> > 11096 pts/0    00:00:00 mysqld
> > 11098 pts/0    00:00:00 mysqld
> > 11099 pts/0    00:00:00 mysqld
> > [admin admin]$
> >
> > > Hi ???,
> > >
> > > I don't know which OS you are talking about, but I guess for a Linux
OS.
> > >
> > > Try this:
> > >
> > > ps -u
> > >
> > > see on the left the Linux account it uses.
> > >
> > > ps -u
> > > USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
> > > root      1266  0.0  0.0  1360  468 tty1     S    May28   0:00
> >
> > /sbin/mingetty
> >
> > > --noclear tty1
> > > root      1267  0.0  0.0  1360  468 tty2     S    May28   0:00
> >
> > /sbin/mingetty
> >
> > > tty2
> > > root      1268  0.0  0.0  1360  468 tty3     S    May28   0:00
> >
> > /sbin/mingetty
> >
> > > tty3
> > > root      1269  0.0  0.0  1360  468 tty4     S    May28   0:00
> >
> > /sbin/mingetty
> >
> > > tty4
> > > root      1270  0.0  0.0  1360  468 tty5     S    May28   0:00
> >
> > /sbin/mingetty
> >
> > > tty5
> > > root      1271  0.0  0.0  1360  468 tty6     S    May28   0:00
> >
> > /sbin/mingetty
> >
> > > tty6
> > > root      3676  0.0  0.3  5620 1664 pts/1    S    10:24   0:00
/bin/bash
> > > root      3849  0.0  0.3  5616 1648 pts/2    S    11:12   0:00
/bin/bash
> > > root      3943  0.0  0.3  2688 1652 pts/2    R    11:25   0:00 ps -u
> > >
> > > make sure there is NO mysql process here.
> > >
> > > Then do "ps -u mysql" - or whichever account it uses.
> > >
> > > baby-bumble-bee:~ # ps -u mysql
> > >   PID TTY          TIME CMD
> > >   750 ?        00:00:00 mysqld-max
> > >   818 ?        00:00:00 mysqld-max
> > >   819 ?        00:00:00 mysqld-max
> > >   926 ?        00:00:00 mysqld-max
> > >
> > >
> > > I assume you have an extra Linux user accout f.e "mysql" with no
> > > superuser privileges. If not create one.
> > >
> > > In case it does not run as let's say "mysql" Linux user account you
can
> > > specify the user in /etc/my.cnf (or ~/.my.cnf or
> >
> > /var/lib/mysql/.my.cnf ) -
> >
> > > Please see the docs for more details.
> > >
> > > [mysqld]
> > > user= mysql
> > >
> > > or
> > >
> > > [safe_mysqld]
> > > user=mysql
> > >
> > > That should be it.
> > >
> > > Best regards
> > >
> > > Nils Valentin
> > > Tokyo/Japan
> > >
> > > PS: The same question was asked within the last 24 hours. Look for
threat
> > > "database permissions" from Ted ;-)
> > >
> > > 2003年 5月 30日 金曜日 16:17、2Hosts.com さんは書きました:
> > > > Hi guys,
> > > >
> > > > On page 54 of the Sams "teach yourself MySQL in 24 hrs" it says the
> >
> > owner
> >
> > > > should not be root, and to change it.  I can't seem to find out how
to
> >
> > do
> >
> > > > this - could anyone guide me in the right direction please?
> > > >
> > > > I searched the list archives to no avail.
> > > > Many thanks.  :o)
> > >
> > > --
> > > ================================================
> > > Valentin Nils
> > > Internet Technology
> > >
> > >  E-Mail: [EMAIL PROTECTED]
> > >  URL: http://www.knowd.co.jp/staff/nils
> > > ------------------------------------------------
> > >  有限会社ナレッジデザイン
> > >  〒182-0024 東京都調布市布田4-6-1 調布丸善ビル7F
> > >  Phone: 0424-40-7912 Fax: 0424-40-7913
> > >  URL: http://www.knowd.co.jp
> > > ================================================
>
> -- 
> ================================================
> Valentin Nils
> Internet Technology
>
>  E-Mail: [EMAIL PROTECTED]
>  URL: http://www.knowd.co.jp/staff/nils
> ------------------------------------------------
>  有限会社ナレッジデザイン
>  〒182-0024 東京都調布市布田4-6-1 調布丸善ビル7F
>  Phone: 0424-40-7912 Fax: 0424-40-7913
>  URL: http://www.knowd.co.jp
> ================================================
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to