start mysql database as mysql instead of root

start mysql database as mysql instead of root

Post by rasshadrockuhur » Sat, 18 Jan 2003 07:38:15



Hi
having trouble with mysql
i can only start the server as root
when i use adduser interactivly to create mysql
i use /usr/bin/false as the shell
but i am not sure about the password
or if  i need a home directory for the mysql user
what adduser command do i use to
create an unprivilidge user (mysql)
for the mysql server to run as.

shadrock

 
 
 

start mysql database as mysql instead of root

Post by +mr_scar » Sat, 18 Jan 2003 07:58:56


On Thu, 16 Jan 2003 22:38:15 +0000, rasshadrockuhuru

Quote:>Hi
>having trouble with mysql
>i can only start the server as root
>when i use adduser interactivly to create mysql
>i use /usr/bin/false as the shell
>but i am not sure about the password
>or if  i need a home directory for the mysql user
>what adduser command do i use to
>create an unprivilidge user (mysql)
>for the mysql server to run as.

I run the server under what I consider the mysql administrator
(mysqladm).  I *do* allow logins and I *do* set up a home directory
for him.  Any backups are also done by him and are stored under
/home/mysql.  Obviously you must accord him the rights to interact
with the database.  He gets all rights except GRANT.

 
 
 

start mysql database as mysql instead of root

Post by rasshadrockuhur » Sun, 19 Jan 2003 14:31:25




>On Thu, 16 Jan 2003 22:38:15 +0000, rasshadrockuhuru

>>Hi
>>having trouble with mysql
>>i can only start the server as root
>>when i use adduser interactivly to create mysql
>>i use /usr/bin/false as the shell
>>but i am not sure about the password
>>or if  i need a home directory for the mysql user
>>what adduser command do i use to
>>create an unprivilidge user (mysql)
>>for the mysql server to run as.

>I run the server under what I consider the mysql administrator
>(mysqladm).  I *do* allow logins and I *do* set up a home directory
>for him.  Any backups are also done by him and are stored under
>/home/mysql.  Obviously you must accord him the rights to interact
>with the database.  He gets all rights except GRANT.

got him up and running

thanx
shadrock

 
 
 

start mysql database as mysql instead of root

Post by rasshadrockuhur » Tue, 28 Jan 2003 12:52:57


On Sat, 18 Jan 2003 05:31:25 +0000, rasshadrockuhuru




>>On Thu, 16 Jan 2003 22:38:15 +0000, rasshadrockuhuru

>>>Hi
>>>having trouble with mysql
>>>i can only start the server as root
>>>when i use adduser interactivly to create mysql
>>>i use /usr/bin/false as the shell
>>>but i am not sure about the password
>>>or if  i need a home directory for the mysql user
>>>what adduser command do i use to
>>>create an unprivilidge user (mysql)
>>>for the mysql server to run as.

>>I run the server under what I consider the mysql administrator
>>(mysqladm).  I *do* allow logins and I *do* set up a home directory
>>for him.  Any backups are also done by him and are stored under
>>/home/mysql.  Obviously you must accord him the rights to interact
>>with the database.  He gets all rights except GRANT.

>got him up and running

>thanx
>shadrock

mysql user details :-

login   mysql
passwd  *
uid     40
groups  mysql
change  NEVER
class
gecos   database-Master
dir     /home/mysql
shell   /bin/sh
expire  NEVER

openbsd 3.2
mysql installed from port tree

mysqld startup command line :-

                        /usr/local/bin/safe_mysqld -user=mysql -log &

---------
using the above commandline, mysql fails to start
the log says that mysqld cannot change to user mysql

do i need to grant database rights to mysql before you can run mysqld
as mysql  ?

am i the only one whith this problem, can't find anything in the mail
archives

 
 
 

start mysql database as mysql instead of root

Post by +mr_scar » Wed, 29 Jan 2003 11:50:44


On Mon, 27 Jan 2003 03:52:57 +0000, rasshadrockuhuru

>On Sat, 18 Jan 2003 05:31:25 +0000, rasshadrockuhuru



>>>On Thu, 16 Jan 2003 22:38:15 +0000, rasshadrockuhuru

>>>>Hi
>>>>having trouble with mysql
>>>>i can only start the server as root
>>>>when i use adduser interactivly to create mysql
>>>>i use /usr/bin/false as the shell
>>>>but i am not sure about the password
>>>>or if  i need a home directory for the mysql user
>>>>what adduser command do i use to
>>>>create an unprivilidge user (mysql)
>>>>for the mysql server to run as.

>>>I run the server under what I consider the mysql administrator
>>>(mysqladm).  I *do* allow logins and I *do* set up a home directory
>>>for him.  Any backups are also done by him and are stored under
>>>/home/mysql.  Obviously you must accord him the rights to interact
>>>with the database.  He gets all rights except GRANT.

>>got him up and running

>>thanx
>>shadrock

>mysql user details :-

>login   mysql
>passwd  *
>uid     40
>groups  mysql
>change  NEVER
>class
>gecos   database-Master
>dir     /home/mysql
>shell   /bin/sh
>expire  NEVER

>openbsd 3.2
>mysql installed from port tree

>mysqld startup command line :-

>                    /usr/local/bin/safe_mysqld -user=mysql -log &

>---------
>using the above commandline, mysql fails to start
>the log says that mysqld cannot change to user mysql

>do i need to grant database rights to mysql before you can run mysqld
>as mysql  ?

>am i the only one whith this problem, can't find anything in the mail
>archives

You need to ensure ownership and permissions for the mysql related
directories and files are set for this user.

Including that issue and more, here are some of my notes.  Notice how
I set up my user during the build phase:

./configure --prefix=/usr/local/mysql --with-mysqld-user=mysqladm
make
make install
scripts/mysql_install_db
groupadd mysqlgrp
useradd -c "MySQL user" -g mysqlgrp mysqladm
passwd mysqladm
chown -R root:mysqlgrp  /usr/local/mysql
chown -R mysqladm /usr/local/mysql/var
edit the PATH for the MySQL user: append /usr/local/mysql/bin
scripts/safe_mysqld &
bin/mysqladmin -u root password "$ROOTPASS"
bin/mysql -u root -p mysql

"$MYSQLADMPASS";