Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
Before I start, get it straight that I'm a Linux noob. I finished installing Slackware, my first proper Linux install, for permanent and full use. I installed it as it's ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    8

    MySQL Problems


    Before I start, get it straight that I'm a Linux noob.

    I finished installing Slackware, my first proper Linux install, for permanent and full use.

    I installed it as it's for a server, so obviously I direct myself towards Apache and MySQL. My friend then tells me of webmin (http://www.webmin.com), so I get that with usermin (same site, different section).

    It installs and my mate says it should do everything for itself.

    It installs fine and everything is dandy, config pages working, Apache working. Then I try MySQL and it won't start, I find the error log, and it says:

    050303 09:58:49 mysqld started
    050303 9:58:51 InnoDB: Started
    050303 9:58:51 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
    050303 9:58:51 Aborting

    050303 9:58:51 InnoDB: Starting shutdown...
    050303 9:58:53 InnoDB: Shutdown completed
    050303 9:58:53 /usr/libexec/mysqld: Shutdown Complete

    050303 09:58:53 mysqld ended
    How can I fix this?

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Did you do
    Code:
    #mysql_install_db
    After you installed mysql?

    If not, do so, because you'll need the initial database structure, where mysql.host among other tables are created

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    8
    erm....I didn't install mysql? Isn't it like built into Linux?

    Anyway where would I enter that?

  4. #4
    Just Joined!
    Join Date
    Mar 2005
    Posts
    12
    When you do that you will also need to update the mySQL section in webmin after you install.

    EDIT:That is if you didn't install mysql. It depends on if you selected to install it during the Slackware install. As root type pkgtool, then go to view and see if you have the mysql package installed.

  5. #5
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Hmm!
    No it is not "built" in Linux, it is a ware as all other apps.

    You'll have to do it from a shell, and you have to be "root" as well.

    Open you favorit shell
    Code:
    /home/nisan>su -
    /root#mysql_install_db
    .
    .
    .
    /root#
    Then you should be able to start mysql.

    If the command fails or not found, try to locate it.
    Code:
    locate mysql_install_db
    if this fails, do
    Code:
    updatedb
    and retry with the "locate" command!
    If "locate" is a unknown command, install "locate" packet! You'll need it in the future. Helped me tons of times to find files.

  6. #6
    Just Joined!
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    8
    omegadot: The point being I can't start it, meaning I can't edit it.

    Thanks swemic, I'll try that now.

    ok erm su - just gives a random message?

    When I boot I get "stopping server from PID file /var/run/mysql/mysql.pid"

    How do I get into the shell root stuff? Do I just type #mysql_install_db or mysql_install_db?

    I get the same error for just doing mysql_install_db as I do on boot.

    For locate I get "warning: locate: could not open database /var/lib/slocate/slocate.db: no such file or directory"

    For updatedb I get "warning: updatedb: could not open database /var/lib/slocate/slocate.db: no such file or directory"

    Maybe I should just install MySQL by downloading it etc?

  7. #7
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    When you run the command, are you logged in as root or a regular user?
    It's kind a important that you are root!

    Btw the command should be without the "#"

    This goes for all commands I just previous told you about!

  8. #8
    Just Joined!
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    8
    I don't have any users, so yes I've done everything in root, and in mysql.

    It's not working so I'm just going to download it and install it fresh.

    Thanks for trying to help anyway

  9. #9
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Hold your horses,
    since you have the start script for MySQL and the demon is really trying to start up but gives you some errors, that means you have MySQL installed. You just don't have it properly configured yet. Hmm! Remember that there where something odd with the Slackware preconfigured MySQL installation.

    I'll check out one of my older servers where I have MySQL and Slackware installed.

    I'll be back

  10. #10
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Ok, here we go.

    First we'll have to check if you have any kind of MySQL database files at all.

    Just do a
    Code:
    ls -l /usr/local/var/
    This is where Slackware defaults the MySQL databases
    If you have the databases there you should have something like
    Code:
    drwx------   2 root     root         4096 Jul 11  2001 mysql/
    -rw-r--r--   1 root     root       320300 Jan  9 09:51 seagle.err
    -rw-rw----   1 root     root            3 Jan  9 09:51 seagle.pid
    (Never mind the seagle.pid file, it's mine only)
    However, here is where you should have your error file that you got information from at your first posting here.
    Or where did you find the error messages?

    Now, if you did not have this directory structure, try once again to install the default databases but now with this syntax:
    Code:
    /usr/local/bin/mysql_install_db
    Are still getting errors at your command prompt? Could you then cut and paste them here please

Page 1 of 2 1 2 LastLast

Posting Permissions

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