Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Newbie help with MySQL server

    Hi all,

    My first post about my linux problems. I've search all I can and tried everything here but I can't get my mysql server to get up and running and I don't know if there's an stupid thing I've missed as im sooo new to linux.

    Ok so I install mysqlserver by yum and it's all in the default directories.

    Here's my first error

    [root@crapcorp mysql]# /usr/libexec/mysqld
    070303 15:28:36 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

    070303 15:28:36 [ERROR] Aborting

    070303 15:28:36 [Note] /usr/libexec/mysqld: Shutdown complete

    Ok whoops, can't run it as root, let's run as another user

    [root@crapcorp mysql]# /usr/libexec/mysqld -u dan
    070303 15:29:23 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    070303 15:29:23 InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 43634.
    InnoDB: Doing recovery: scanned up to log sequence number 0 43634
    070303 15:29:23 InnoDB: Flushing modified pages from the buffer pool...
    070303 15:29:23 InnoDB: Started; log sequence number 0 43634
    070303 15:29:23 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
    070303 15:29:23 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
    070303 15:29:23 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)

    mmm what's it on about here? seems 'dan' can't get to that file, ah-ha I can run Mysql as root, just have to be careful about it. But the it says the formatting is wrong of host.frm.

    Now I have run mysql_install_db loads of times, nothing and my my.cnf is going to the correct place.

    Help? Am I being dumb?

  2. #2
    hey guys, seems it works now, im not sure if this is right but i think it's wot I did.

    I changed the permissions of the var/lib/mysql/mysql directory so user 'dan' was the owner.

    Then I ran mysql_install_db

    Then I ran mysqld as dan

    It worked!

    So I can only assume that mysql_install_db doesn't really work if root is the owner of the folder or something.

Posting Permissions

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