Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: MySQL Setup help

  1. #1

    MySQL Setup help

    First off... Wow 2 other MySQL threads, wierd.

    Anyway, if you noticed before I have just started to use Psyche 8.0 and I like d it until now :P I want to start using the MySQL database to learn it and use it for some web stuff. But unfortunately I keep on getting some errors, I worked through a couple of them but I am stumped on this one. When I do a safe_mysqld this is what happens
    Code:
    [root@dhcp-482-907 bin]# safe_mysqld
    Starting mysqld daemon with databases from /var/lib/mysql/mysql
    021015 01:52:06  mysqld ended
    This is what ends up in the log file for mysql
    Code:
    021015 01:52:04  mysqld started
    021015  1:52:06  bdb:  /var/lib/mysql/mysql/log.0000000001: Permission denied
    021015  1:52:06  bdb:  PANIC: Permission denied
    021015  1:52:06  Can't init databases
    021015 01:52:06  mysqld ended
    So I put the --bdb-no-recover flag in the my.cnf but that doesn't sem to help. Should I just disable the bdb option completely. I mean what is the point of it anyway? Please help completely and utterly confused.

    TIA

  2. #2

    Re:MySQL Setup help

    Did you install from binaries or RPM? If you installed from binaries, did you read the INSTALL and README thouroughly? When you install from binary you need to chown a whole bunch of directories in order to get mysql to work, as well as make a mysql user for the daemon to start as. Also, when you start safe_mysqld I think you need to specify a user to run the daemon as. As of right now, that is the only thing I can think is keeping the mysql from starting.

    This is ripped straight from the INSTALL-BINARY
    Code:
         shell> groupadd mysql
         shell> useradd -g mysql mysql
         shell> cd /usr/local
         shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
         shell> ln -s mysql-VERSION-OS mysql
         shell> cd mysql
         shell> scripts/mysql_install_db
         shell> chown -R root  /usr/local/mysql
         shell> chown -R mysql /usr/local/mysql/data
         shell> chgrp -R mysql /usr/local/mysql
         shell> chown -R root /usr/local/mysql/bin
         shell> bin/safe_mysqld --user=mysql &
    If you followed this and it still isn't starting, I'm stumped.

  3. #3

    Re:MySQL Setup help

    Hey thanx but I would assume that I installed it from RPM... I say that because I installed it during the RH8.0 install but I haven't done the user thing yet

  4. #4

    Re:MySQL Setup help

    If you installed from RPM on RH, just do a--

    Code:
    /etc/rc.d/init.d/mysqld start
    That should be all that is needed. The init script will take care of the rest for you. If even that fails, remove it and install from binary following the instructions in the INSTALL file.

  5. #5

    Re:MySQL Setup help

    I am downloading the tarball as I write

  6. #6

    Re:MySQL Setup help

    Ok god news it works now... I can start the server up BUT now the srever only runs as root. It will not run as the mysql user. I know that there aer security implications for running the MySQL server as root so I don't don't wnat to if I don't have to. I don't suppose anyone could help me on this one now... PLEASE ;D

    TIA

  7. #7

    Re:MySQL Setup help

    Try that :
    Firest you have to go to /usr/local/mysq (whatever your mysql is installed), and then issue: bin/safe_mysqld --user=mysql &
    (Do exactly like this)

  8. #8

    Re:MySQL Setup help

    If you follow the snippet I posted above from the INSTALL-BINARY, that should tell you everything you need to know to run mysqld as mysql_user instead of root. Just follow it step-by-step. I ripped that from the INSTALL-BINARY of the latest mysql tarball.

    Running mysqld with the bin/safe_mysqld --user=mysql & only works if you have set the correct permissions on the mysql directory tree.

    Once you get things running, put this in your rc.local

    Code:
    cd /path/to/mysql && bin/safe_mysqld --user=mysql
    So it will start at boot time.

  9. #9

    Re:MySQL Setup help

    Ok guys,

    I've done the things you have asked me execpt for putting that script in rc.local, I haven't done that because it won't let safe_mysqld start with mysq user as it shows here:
    Code:
    [root@dhcp-482-1191 mysql]# pwd
    /usr/local/mysql
    [root@dhcp-482-1191 mysql]# bin/safe_mysqld --user=mysql
    Starting mysqld daemon with databases from /usr/local/mysql/data
    021016 15:11:12  mysqld ended
    
    [root@dhcp-482-1191 mysql]#
    So I go to the error log in /usr/local/mysql/data and see this:
    Code:
    021016 15:11:12  mysqld started
    Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!
    021016 15:11:12  Aborting
    
    021016 15:11:12  /usr/local/mysql/bin/mysqld: Shutdown Complete
    
    021016 15:11:12  mysqld ended
    The user exists because I did those commands groupadd and useradd. I even went as far as to del the ones that came from my RPM install and then I recreated them using the commands. Still doesn't work as mysql > :'(

  10. #10

    Re:MySQL Setup help

    Did you check your /etc/passwd to make sure they they are in fact in ther and in the mysql group?

Similar Threads

  1. installed mysql and php, trying to setup phpmyadmin to no avail
    By beemer832 in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 04-15-2010, 07:34 PM
  2. Unable to setup a NIS server setup on CentOS system
    By swatidas in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 01-19-2010, 02:42 PM
  3. MySQL install/setup
    By beemer832 in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 11-23-2009, 04:54 AM
  4. Problem starting mysql conflicts with the RPM "mysql-5.0.27-1.fc6"
    By kamakshiganesh in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-26-2007, 04:35 AM
  5. MySQL setup
    By mtfriend in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 02-18-2003, 05:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •