VectorLinux
November 27, 2014, 01:14:24 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: mysql user "mysql" is it an incorrect username on VL5.9?  (Read 1479 times)
bad_gui
Member
*
Posts: 61


« on: February 27, 2008, 08:47:34 pm »

I am configuring mysql that is on VL5.9.  There was already a group named "mysql" but now
I need to add a user "mysql"  The vasm utility wants a lowercase-number format (e.g. mysql1)
which will likely cause problems for the application (call it a hunch).

http://hostlibrary.com/installing_apache_mysql_php_on_linux

Quote
Cool !, MySQL is installed, there are only a couple things left to do to get it working, first we need to create a group for MySQL as follows;

#/usr/sbin/groupadd mysql (enter)

Then we create a user called mysql which belongs to the mysql group;

#/usr/sbin/useradd -g mysql mysql (enter)

Now we install the database files as follows;

#./scripts/mysql_install_db (enter)

Then we make a couple minor ownership changes;

# chown -R root:mysql /usr/local/mysql (enter)

# chown -R mysql:mysql /usr/local/mysql/data (enter)

Is the username-number requirement just for vasm or does it apply for the commandline useradd also?

My system isn't visible to the outside world so the extra level of security isn't needed.
Logged
rbistolfi
Packager
Vectorian
****
Posts: 2290


« Reply #1 on: February 28, 2008, 03:52:32 pm »

I believe the cause of that is VL already has the mysql user by default. Since each user needs to be unique, VASM is correctly asking to rename the user.  Try cat /etc/passwd to get a list of users (the first element of each row). And cat etc/group for a list of the current groups in the system.
So you can jump the useradd and groupadd commands.
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
bad_gui
Member
*
Posts: 61


« Reply #2 on: February 28, 2008, 08:28:56 pm »

Thanks!  I forgot to check /etc/passwd and sure enough mysql user was there.

I would like to start/stop apache and mysql more cleanly than just copying the
command line start to rc.local.

Here is the comment from the mysqld docs:
Quote
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

What is the right place?  just /etc/rc.d/init.d ?
Logged
rbistolfi
Packager
Vectorian
****
Posts: 2290


« Reply #3 on: February 28, 2008, 09:06:12 pm »

I think the best would be to create an rc.mysql file. I like to put them in /etc/rc.d/ but you know, may be someone else has a reason to put the file in other place Wink.
I just found a nice sample file by kocil at /etc/rc.d/init.d/sample/lampp. You have to edit the vars at the top of the script. Remember to make the file executable or it will do nothing.

Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
bad_gui
Member
*
Posts: 61


« Reply #4 on: March 01, 2008, 10:48:38 am »

Here is a section of my file /etc/rc.d/rc.apache  It didn't start the service when I
rebooted.  It is executable.  I can run it from commandline /etc/rc.d/rc.apache start
and it works fine.

Code:
#!/bin/sh
# description: Apache
#
# (c) 2004, Eko M. Budi, for Vector Linux
# Released under GNU GPL

SERVER="apache"
APPS="apache"
ROOT="/usr/local/apache2/bin/"
CMDLINE="$ROOT/apachectl"

. /etc/rc.d/functions

case "$1" in
        start)
                echo -n "Starting $SERVER............"
                $CMDLINE start > /dev/null
                evaluate_retval
                ;;
        stop)
                echo -n "Stopping $SERVER............"
                $CMDLINE stop > /dev/null
                evaluate_retval
                ;;
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!