This is a discussion on trouble getting mysql to work within the Linux Operating System forums, part of the Unix Operating Systems category; --> I just installed Slackware 10.2 and can't get mysql to load up. Searching newsgroups for answers I came across ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I just installed Slackware 10.2 and can't get mysql to load up. Searching newsgroups for answers I came across a previous request from myself here: http://groups.google.com/group/comp....b25f1e b0431d It was for 10.1 on a laptop. I don't know if I ever got it to work... that laptop is long dead, and this message thread doesn't indicate if I succeeded. =) But it's the exact same problem, and I did exactly what was suggested in this thread, and no go. The problem is: I try to start mysql and I get: root@slackserve:~# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run /mysql/mysql.sock' (2) and in /var/lib/mysql/slackserve.err I have: 060313 15:13:55 mysqld started 060313 15:13:59 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... 060313 15:13:59 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 060313 15:14:00 InnoDB: Flushing modified pages from the buffer pool... 060313 15:14:00 InnoDB: Started; log sequence number 0 43634 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 060313 15:14:00 [ERROR] Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 060313 15:14:00 mysqld ended As in that other thread, I ran: /usr/bin/mysql_install_db and [rc.d]# cd /var/lib [lib]# chown -R mysql:mysql mysql and when I /etc/rc.d/rc.mysql start I still get: Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysql/mysql.pid mysqld ended Any suggestions? Thanks! Liam |
| |||
| On Mon, 13 Mar 2006 13:31:44 -0800, Liam wrote: > <snip> > 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: > './mysql/host.frm' (errno: 13) > 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: > './mysql/host.frm' (errno: 13) > 060313 15:14:00 [ERROR] Fatal error: Can't open privilege tables: Can't > find file: './mysql/host.frm' (errno: > 13) > 060313 15:14:00 mysqld ended > <snip> > and when I /etc/rc.d/rc.mysql start > I still get: > > Starting mysqld daemon with databases from /var/lib/mysql > STOPPING server from pid file /var/run/mysql/mysql.pid > mysqld ended > > Any suggestions? > Thanks! > Liam Liam, I haven't seen these particular messages before but the errors that precede the exit seem pretty explicit: "Can't find file..." Is that file (host.frm) present? If not, you're not completely installed. MySQL won't run without its host data. On my computer with a freshly installed 5.0.18-0 which installed uneventfully, in the expected location (/var/lib/mysql/) and fired right up running from the installation rpms, that file is under the above plus /mysql/host.frm. Frank |
| |||
| frank wrote: > On Mon, 13 Mar 2006 13:31:44 -0800, Liam wrote: > > > <snip> > > 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: > > './mysql/host.frm' (errno: 13) > > 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: > > './mysql/host.frm' (errno: 13) > > 060313 15:14:00 [ERROR] Fatal error: Can't open privilege tables: Can't > > find file: './mysql/host.frm' (errno: > > 13) > > 060313 15:14:00 mysqld ended > > <snip> > > and when I /etc/rc.d/rc.mysql start > > I still get: > > > > Starting mysqld daemon with databases from /var/lib/mysql > > STOPPING server from pid file /var/run/mysql/mysql.pid > > mysqld ended > > > > Any suggestions? > > Thanks! > > Liam > > Liam, > > I haven't seen these particular messages before but the errors that > precede the exit seem pretty explicit: "Can't find file..." > > Is that file (host.frm) present? If not, you're not completely installed. > MySQL won't run without its host data. On my computer with a freshly > installed 5.0.18-0 which installed uneventfully, in the expected location > (/var/lib/mysql/) and fired right up running from the installation rpms, > that file is under the above plus /mysql/host.frm. > Hmm, indeed, slocate failed to find that file. I did a full Slackware 10.2 install, but I guess something did work quite right. I'll see about reinstalling the package. Thanks |
| |||
| Liam wrote: > frank wrote: >> On Mon, 13 Mar 2006 13:31:44 -0800, Liam wrote: >> >>> <snip> >>> 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: >>> './mysql/host.frm' (errno: 13) >>> 060313 15:14:00 [ERROR] /usr/libexec/mysqld: Can't find file: >>> './mysql/host.frm' (errno: 13) >>> 060313 15:14:00 [ERROR] Fatal error: Can't open privilege tables: Can't >>> find file: './mysql/host.frm' (errno: >>> 13) >>> 060313 15:14:00 mysqld ended >>> <snip> >>> and when I /etc/rc.d/rc.mysql start >>> I still get: >>> >>> Starting mysqld daemon with databases from /var/lib/mysql >>> STOPPING server from pid file /var/run/mysql/mysql.pid >>> mysqld ended >>> >>> Any suggestions? >>> Thanks! >>> Liam >> Liam, >> >> I haven't seen these particular messages before but the errors that >> precede the exit seem pretty explicit: "Can't find file..." >> >> Is that file (host.frm) present? If not, you're not completely installed. >> MySQL won't run without its host data. On my computer with a freshly >> installed 5.0.18-0 which installed uneventfully, in the expected location >> (/var/lib/mysql/) and fired right up running from the installation rpms, >> that file is under the above plus /mysql/host.frm. >> > Hmm, indeed, slocate failed to find that file. > I did a full Slackware 10.2 install, but I guess something did work > quite right. > I'll see about reinstalling the package. > > Thanks > I have the same problem. Installed mysql from current with gslapt. Thor-inge |
| |||
| Liam wrote: > I just installed Slackware 10.2 and can't get mysql to load up. > > > The problem is: > I try to start mysql and I get: > > root@slackserve:~# mysql > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/var/run /mysql/mysql.sock' (2) > > > Did you run mysql_install_db? You need to do that on a new installation with mysql_install_db --user=mysql -- Everything works -- if you let it. |
| |||
| Thomas Ronayne wrote: > Liam wrote: >> I just installed Slackware 10.2 and can't get mysql to load up. >> >> >> The problem is: >> I try to start mysql and I get: >> >> root@slackserve:~# mysql >> ERROR 2002 (HY000): Can't connect to local MySQL server through socket >> '/var/run /mysql/mysql.sock' (2) >> >> >> > Did you run mysql_install_db? You need to do that on a new installation > with > > mysql_install_db --user=mysql > Whitch permissions should /var/lib/mysql/ have I got this error 60314 23:43:31 mysqld started 060314 23:43:32 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: 'open'. InnoDB: Cannot continue operation. 060314 23:43:32 mysqld ended Thor-Inge |
| |||
| Thor-Inge wrote: > > Whitch permissions should /var/lib/mysql/ have > > Thor-Inge > You may not have done the initial set up of MySQL logged in as root? Gotta do that on a new installation. Go look at http://dev.mysql.com/doc/refman/4.1/...tallation.html. If you installed MySQL from the Slackware distribution CD-ROM, the BASEDIR is /var/lib/mysql. * Log in as root (you *must* be root to do this) * cd /var/lib * ls -l If the mysql directory in /var/lib is *not* drwxr-x--- 8 mysql mysql 1584 2006-03-12 10:51 mysql/ (the size will not be 1584, don't worry about the size, only the mask, owner and group) do this: o chown mysql mysql o chgrp mysql mysql o chmod 750 mysql * cd /var/lib/mysql * mysql_install_db --user=mysql * ls -l You should have a directory mysql and a directory test; they should look like this: drwx------ 2 mysql root 1584 2005-10-05 08:42 mysql/ drwx------ 2 mysql root 384 2005-10-05 13:12 test/ You will also have one or more files named ib_something; they should be owned by mysql, group mysql, mask -rw-rw----. The content of the mysql directory (this is /var/lib/mysql/mysql) should be owned by mysql, group mysql and the permission mask for all files should be -rw-rw----. Now, if you do not have the above, you can (*if* you do not have any existing data bases other than the mysql and test data bases!) * Log in as root * cd /var/lib/mysql * rm -r * * mysql_install_db --user=mysql The above will set things up the way they're supposed to be. Then, as root, start MySQL with sh /etc/rc.d/rc.mysqld start and you should be good to go. -- Everything works -- if you let it. |
| |||
| Thomas Ronayne wrote: > Thor-Inge wrote: >> >> Whitch permissions should /var/lib/mysql/ have >> >> Thor-Inge >> > You may not have done the initial set up of MySQL logged in as root? > Gotta do that on a new installation. > > Go look at > http://dev.mysql.com/doc/refman/4.1/...tallation.html. If > you installed MySQL from the Slackware distribution CD-ROM, the BASEDIR > is /var/lib/mysql. > > * Log in as root (you *must* be root to do this) > * cd /var/lib > * ls -l > If the mysql directory in /var/lib is *not* > drwxr-x--- 8 mysql mysql 1584 2006-03-12 10:51 mysql/ > (the size will not be 1584, don't worry about the size, only the > mask, owner and group) > do this: > o chown mysql mysql > o chgrp mysql mysql > o chmod 750 mysql > * cd /var/lib/mysql > * mysql_install_db --user=mysql > * ls -l > > You should have a directory mysql and a directory test; they should look > like this: > > drwx------ 2 mysql root 1584 2005-10-05 08:42 mysql/ > drwx------ 2 mysql root 384 2005-10-05 13:12 test/ > > You will also have one or more files named ib_something; they should be > owned by mysql, group mysql, mask -rw-rw----. > > The content of the mysql directory (this is /var/lib/mysql/mysql) should > be owned by mysql, group mysql and the permission mask for all files > should be -rw-rw----. > > Now, if you do not have the above, you can (*if* you do not have any > existing data bases other than the mysql and test data bases!) > > * Log in as root > * cd /var/lib/mysql > * rm -r * > * mysql_install_db --user=mysql > > The above will set things up the way they're supposed to be. Then, as > root, start MySQL with > > sh /etc/rc.d/rc.mysqld start > > and you should be good to go. > Now I think it works. A newbie/noob thanks for all the help. Any reason why mysql don't run out of the box with Slackware or is it like that for all distros root@darkstar:/bin# mysqladmin version mysqladmin Ver 8.41 Distrib 5.0.18, for slackware-linux-gnu on i486 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 5.0.18 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysql/mysql.sock Uptime: 13 min 31 sec Threads: 1 Questions: 1 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 6 Queries per second avg: 0.001 |
| ||||
| Thor-Inge wrote: > Now I think it works. Good. > A newbie/noob thanks for all the help. Yer welcome. > Any reason why mysql don't run out of the box with Slackware or is it > like that for all distros Look at http://dev.mysql.com/doc/refman/4.1/...tallation.html -- yeah, you have to do that for any new installation of MySQL (and I've had to do that on every Linux distribution and Solaris distribution I've installed MySQL on). RTFM (almost) always works. The keyword might be "installed;" perhaps some distributions do you a "big favor" and execute mysql_install_db for you, but neither Slackware or Solaris do so you don't have to have it if you don't want it, maybe. -- Everything works -- if you let it. |