LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem on starting MySql Server (https://www.linuxquestions.org/questions/slackware-14/problem-on-starting-mysql-server-270445/)

Obscure 12-26-2004 08:01 AM

Problem on starting MySql Server
 
Hi

I'm trying to start mysqld on my Slackware 10 but it won't start!
I have installed MySQL from Slackware original pkg.

Code:

#mysqld_safe
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/thor.pid
041226 14:30:26  mysqld ended

On logs I can see:
Code:

041226 14:17:58  mysqld started
041226 14:17:59  InnoDB: Started
041226 14:17:59 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
041226 14:17:59 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
041226 14:17:59 Aborting

041226 14:17:59  InnoDB: Starting shutdown...
041226 14:18:01  InnoDB: Shutdown completed
041226 14:18:01 /usr/libexec/mysqld: Shutdown Complete

I tried (logged as mysql user) to do mysql_install_db but I recive this errors:
Code:

mysql@thor:~$ 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
041226 14:54:44 /usr/libexec/mysqld: File './thor-bin.index' not found (Errcode: 13)
041226 14:54:44 Could not use thor-bin for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/db.frm' (errno: 13)
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/db.frm' (errno: 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)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/user.frm' (errno: 13)
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/user.frm' (errno: 13)
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/user.frm' (errno: 13)
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/user.frm' (errno: 13)
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/user.frm' (errno: 13)
ERROR: 1  Can't create/write to file './mysql/db.frm' (Errcode: 13)
041226 14:54:44 /usr/libexec/mysqld: Can't find file: './mysql/user.frm' (errno: 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)
041226 14:54:44 /usr/libexec/mysqld: Shutdown Complete



Somone should help me to make it start please?
Thank you very much

thermite_1033 12-26-2004 08:31 AM

i had the same problem
just compile it yourself and the problem will go away

or try another package from linux-packages.net

Obscure 12-26-2004 09:17 AM

SOLVED!!

It's a permission problem!!
As written in /etc/rc.d/rc.mysqld file you must do su - mysql etc... but as Patrick says few line below:
Code:

# Note that step one is becoming the mysql user.  It's important to do this
# before making any changes to the database, or mysqld won't be able to write
# to it later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').

This fix my problem!!
Bye

gkernel 09-04-2009 11:29 PM

thanks
 
Quote:

Originally Posted by Obscure (Post 1370748)
SOLVED!!

It's a permission problem!!
As written in /etc/rc.d/rc.mysqld file you must do su - mysql etc... but as Patrick says few line below:
Code:

# Note that step one is becoming the mysql user.  It's important to do this
# before making any changes to the database, or mysqld won't be able to write
# to it later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').

This fix my problem!!
Bye

thanks very match for this help
cause you explain solutions for problem with sample way

Hangdog42 09-05-2009 07:24 AM

I think what he means is that important parts of mysql may be in directories owned by root. Have a look in /var/lib/mysql and make sure that everything is owned by mysql:mysql. If you're not sure, running the chown statement in Patrick's comment will set up permissions properly.


All times are GMT -5. The time now is 12:32 AM.