[Wylug-help] How to setup mysql??

Shaun Laughey shaun at laughey.com
Tue Apr 11 00:51:08 BST 2006


On Mon, 2006-04-10 at 23:37 +0600, Emon wrote:
> Hi all
> 
> I am a newbie running Slackware 10.2 with KDE desktop
> 
> I am trying to setup mythtv, so I am also having to setup mysql.
> 
> I don't know anything about databases so I am kind of trying to 
> (blindly) follow the instructions in the docs & the file 
> /etc/rc.d/rc.mysqld to get mysql up & running...
> 
> My runlevel in /etc/inttab is 4 & this is what I see during startup
> 
> *********************
> Starting mysqld daemon with databases from /var/lib/mysql
>                   /usr/sbin/nmbd -D
> Starting gpm:  /usr/sbin/gpm -m /dev/mouse -t imps2
> Starting lirc daemon: lircd & lircmd... Done
> Starting Guarddog...
> STOPPING server from pid file /var/run/mysql/mysql.pid
> 060410 18:04:02  mysqld ended
> Done
> Starting LISa daemon...
> Done
> Starting up X11 session manager...
> This is the LAN Information Server LISa 0.2.3
> It is free software according the GNU General Public License
> Copyright (c) 2000-2003 by Alexander Neundorf
> email: neundorf at kde.org
> running on port 7741
> Have fun ! :-)
> *********************
> 
> I am still getting the following error while trying to run mythtv
> 
> **********************
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2006-04-10 18:18:34.505 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
> No error type from QSqlError?  Strange...
> 2006-04-10 18:18:34.556 Database not open while trying to save setting: 
> Language
> 2006-04-10 18:18:34.574 Unable to connect to database!
> 2006-04-10 18:18:34.574 Driver error was [1/2002]:
> QMYSQL3: Unable to connect
> Database error was:
> Can't connect to local MySQL server through socket 
> '/var/run/mysql/mysql.sock' (2)
> **********************
> 
> So what is it that I am doing wrong??
> 
> Thanks
> Emon
> 
> BTW I also encountered the following errors while running
> 
> mysql at magic-box:~$ mysql_install_db
> 
> ********************
> ERROR: 1017  Can't find file: './mysql/help_keyword.frm' (errno: 13)
> 060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: 
> './mysql/help_keyword.frm' (errno: 13)
> 060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: 
> './mysql/help_keyword.frm' (errno: 13)
> ERROR: 1017  Can't find file: './mysql/help_keyword.frm' (errno: 13)
> 060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: 
> './mysql/help_relation.frm' (errno: 13)
> 060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: 
> './mysql/help_relation.frm' (errno: 13)
> ********************
Hiya Emon,
I may be completely wrong... however here's my theory.

Those errors about ./mysql/*.frm are due to mysql not being able to read
stuff ending in .frm :-). I'd guess that /var/lib/mysql and everything
below is not owned by mysql.

As root change the ownership of /var/lib/mysql with

chown -R mysql /var/lib/mysql

Then try and get mysql set up with the mysql_install_db as the mysql
user just as you've done before and then look at the startup scripts
only when that works with no errors.


Good luck,

Shaun Laughey,
Py r2 ltd.






More information about the Wylug-help mailing list