Configuring Mysql in Slackware 13.0

Submit to reddit

Slackware 13 has still the same unintuitive style with some things – i.e. akonadi doesn’t start in kde and it doesn’t say why, and so on.

One of the problems you will encounter is that Mysql doesn’t start. Yes, if you look in /usr/doc/mysql… you will find the reason.

Here’s what you have to do:

Run

mysql_install_db

This will configure the default databases mysql needs to function. Now, this is where you would normally start mysql using /etc/rc.d/rc.mysqld start right? Wrong !

If you try you will get:

/etc/rc.d/rc.mysqld start
nohup: redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
090907 19:35:24  mysqld ended

There’s one more step to take:

chown -R mysql:mysql /var/lib/mysql

This gives mysql rights to use it’s own folder and files.

Now you can start mysql

/etc/rc.d/rc.mysqld start

And follow the instructions given by mysql_install_db in setting up the root mysql password.

An article explaining why the heck after installing the ATI Proprietary drivers my resolution is stuck in 1600×1200 as opposed to 1680×1050 will follow as soon as I figure it out.

  • mysql_install_db

    Command not found… back to Google I go 😀

  • The only way you would be missing it is either you are not logged in as root, either you don’t have mysql installed.

  • Pat

    In my case there was no my.cnf file in /etc so I would not me able to connect through port 3306. I solved it creating a symbolic link to one of the existing cnf file samples:

    ln -s my-small.cnf my.cnf

    I am uncertain if this is on all new Slackware 13 installations.

    Nice tutorial!

  • Hello from Russia!
    Can I quote a post in your blog with the link to you?

    • Yes, if there’s a link pointing back, I have no problem in being quoted. Sorry for the late reply but your comment somehow was marked as spam.

  • schizoid

    Thanks, useful info.

  • fb

    Piece of cake. Thank you.

  • Mari

    Muito bom suas dicas de configuração.
    Me ajudou muito.
    Obrigada.