You are not logged in.

#1 2008-02-14 08:49:43

PierreAd
Member
Registered: 2007-05-07
Posts: 19

[solved] mysql reinstall and configuration problems

Hello everyone,

I currently have problems in correctly setting up mysql database server on my arch... Actually, I did install it some months ago but I don't manage to get mysqld running correctly anymore hmm I tried to completely remove mysql and its configuration (as in this topic) but I still can't make mysql daemon start correctly.

Actually, when I try starting the daemon (/etc/rc.d/mysqld start), I get the "[fail]" message. When I look at the logs in /var/lib/mysql/localhost.err, I can see this :

080214 09:31:24  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
080214  9:31:24  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080214  9:31:25  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080214  9:31:25  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
080214  9:31:26  InnoDB: Started; log sequence number 0 0
080214  9:31:26 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
080214 09:31:26  mysqld ended

It seems that there is a problem with privilege tables... but I don't know how to handle this issue !
Could anybody possibly help me ? I've searched for answer for a long time and I'm feeling a bit lost now... Thanks for your help,


PierreAd

Last edited by PierreAd (2008-03-27 08:46:34)

Offline

#2 2008-02-15 09:16:16

penaf
Member
From: Forli', Italy
Registered: 2004-12-02
Posts: 4
Website

Re: [solved] mysql reinstall and configuration problems

I had the same problem after reinstalling with kernel 2.6.24.
I have seen there are two kind of problems:
first of all mysql_install_db requires the TMPDIR to be set, so before calling it I made:
export TMPDIR="/var/lib"
second, I solved the privilege problems by opening the /tmp and /var/lib directories with the commands:

chmod -R 1777 /tmp
chmod -R 1777 /var/lib

I made the changes following the temporary setting from the package filesystem 2008.02-1.
Now mysql works again on my computer, but please consider that in such a way I have opened the access to the directories.

Offline

#3 2008-02-15 10:44:22

PierreAd
Member
Registered: 2007-05-07
Posts: 19

Re: [solved] mysql reinstall and configuration problems

penaf wrote:

I had the same problem after reinstalling with kernel 2.6.24.
I have seen there are two kind of problems:
first of all mysql_install_db requires the TMPDIR to be set, so before calling it I made:
export TMPDIR="/var/lib"
second, I solved the privilege problems by opening the /tmp and /var/lib directories with the commands:

chmod -R 1777 /tmp
chmod -R 1777 /var/lib

I made the changes following the temporary setting from the package filesystem 2008.02-1.
Now mysql works again on my computer, but please consider that in such a way I have opened the access to the directories.

Thanks for your answer, it helped me a lot (even if mysqld is still not running, we've solved a first issue, I managed launching the "mysql_install_db" script)... I also had problems with my hostname which was not properly set in my rc.conf, another problem solved wink

It's still not working, but it's better, hope it will work soon wink

Offline

#4 2008-03-27 08:45:52

PierreAd
Member
Registered: 2007-05-07
Posts: 19

Re: [solved] mysql reinstall and configuration problems

Hi everyone !

I just managed to get mysql running perfectly ! If it can help someone, here are the steps I followed for this :

I was getting this error :

080327  9:10:17  InnoDB: Started; log sequence number 0 43655
080327  9:10:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
080327  9:10:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
080327  9:10:17 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
080327 09:10:17  mysqld ended

Actually, this is a permission problem. When creating the mysql database, mysqld created it with root:root as owner. I changed this to mysql:mysql. After that, I still encountered problems so I decided to empty my "mysql" database. Then I ran "mysql_install_db" once more, changed the permissions. I could then start my mysqld without any issue, and properly set the root password with "mysqladmin -u root password 'mypasswd'", as explained by the mysql_install_db script.

It works !!! big_smile

Offline

Board footer

Powered by FluxBB