Starting MySQL problem

Discussion in 'Site & Server Administration' started by unispace, Dec 13, 2006.

  1. #1
    Hi,

    I'm running a FreedBSD server with mysql 4.1. When I start mysqld via the command:

    # /usr/local/bin/safe_mysqld --user=mysql

    it starts the mysql db (I know because the websites that are running off of it can access the db) but does not return to a prompt, it will let me type but will not respond to the commands or anything. Any ideas on how to resovle this.

    Thanks,
     
    unispace, Dec 13, 2006 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    I dunno what format init F-BSD uses, but you need to execute on start with a shell script, it will keep the terminal window open if you start the service like that as the process you started is still running, same as if you open a file in vi it stays open till you're finished editing.....however if the system starts the service it'll be invisible.....
     
    krakjoe, Dec 14, 2006 IP
  3. ub3r

    ub3r Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    add an & to the end of the command if you want to run safe_mysqld, however if you installed it from ports, you should have a init script at /usr/local/etc/rc.d/mysql-server . you should be able to run

    /usr/local/etc/rc.d/mysql-server start

    but before you can use this script, you need to add

    MYSQL_ENABLE="Yes"

    to your /etc/rc.conf

    You might also want to add:

    mysql_dbdir="/home/mysql"

    To rc.conf, to make mysql store data in /home/mysql, what should be the biggest partition on your system.
     
    ub3r, Dec 17, 2006 IP