starting mysql


Results 1 to 6 of 6

Thread: starting mysql

  1. #1
    Join Date
    Jul 2003
    Location
    Northern California
    Posts
    140

    starting mysql

    This should be pretty basic but I'm at a loss after looking around. I'm trying to get mysql running so I can use phpbb for a bulletin board. At the shell if I use /usr/bin/mysqld_safe I get the following
    Starting mysqld daemon with databases from /var/lib/mysql
    041201 23:11:01 mysqld ended

    I think it might have something to do with there not being a mysql.sock file in /var/run/mysql/mysql.sock which is where it is looking. I can't see that there is any mysql.sock file on my server. Any ideas?

    thanks ahead of time

  2. #2
    Join Date
    Nov 2003
    Posts
    105
    Did you run "mysql_install_db" to create the initial db and tables necessary to run mysqld? Also take a look at mysql logs (they must be located at the same dir as your databases /var/lib/hostname.err or something) to see if you can figure out what's wrong. The socket is not created since the server did not start.

  3. #3
    Join Date
    May 2004
    Location
    Arizona
    Posts
    76
    It looks like the permissions on /var/lib/mysql are wrong. Assuming that you ran the install script, and that the databases exist, they should be owned by mysql:mysql.
    n00b

  4. #4
    Join Date
    Jul 2003
    Location
    Northern California
    Posts
    140
    Ok so this still might be an issue of permissions. I went back and redid /usr/bin/mysql_install_db as the mysql user after I reset the password. When I do this the response is
    mysql@leticia:/var/lib$ /usr/bin/mysql_install_db

    Preparing db table
    Preparing host table
    Preparing user table
    Preparing func table
    Preparing tables_priv table
    Preparing columns_priv table
    Installing all prepared tables
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
    041202 9:16:47 /usr/libexec/mysqld: Shutdown Complete


    I wasn't getting the beginning part of preparing tables so I'm making progress. The permissions on the mysql directory are drwxr-xr-x.

  5. #5
    Join Date
    Dec 2003
    Location
    Phoenix, AZ
    Posts
    647
    You should chown mysql:mysql the whole of /var/lib/mysql. This doens't really hurt anything and is the simplest solution. However MySQL recommends that the root of the mysql installation, like /var/lib/mysql be owned by user root and group mysql. It then says that the data directory, in your case probably /var/lib/mysql/data/ be owned by user mysql and group mysql.

    If you are still having problems and aren't getting any hints, locate the mysql log file. It's probably in /var/log/mysql or /var/log/mysqld. That will probably provide better information than "mysql ended". If you can't find the log file create a file in /etc/ called my.cnf and the following lines.

    Code:
    #/etc/my.cnf
    
    [mysqld]
    err-log=/var/log/mysqld
    Then start safe_mysqld --defaults-file=/etc/my.cnf for 4.x or mysqld_safe --defaults-file-/etc/my.cnf for 3.x.
    "There's a big difference between "copy" and "use". It's exatcly the same
    issue whether it's music or code. You can't re-distribute other peoples
    music (becuase it's _their_ copyright), but they shouldn't put limits on
    how you personally _use_ it (because it's _your_ life)."

    --Linus Torvalds

  6. #6
    Join Date
    Jul 2003
    Location
    Northern California
    Posts
    140
    I actually figured it out so everything is working now I just have to get phpBB to work. thanks for the help.

Posting Permissions

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