LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2001, 09:00 AM   #1
happywht
LQ Newbie
 
Registered: Oct 2001
Posts: 2

Rep: Reputation: 0
Need Help: Can't read Mysql Dir, ErrorCode =13


hello experts,

I am getting the error code message when I login to the database and use the "show tables" command. Could anyone tell me how to solve this problem? Below is a list of commands I performed and their corresponding outputs. You can see that
the "show tables" command fails.



Quote:

Type 'help;' or '\h' for help. Type '\c' to clear the buffer

mysql> show databases;
+----------+
| Database |
+----------+
| dbcbo |
| dbciv |
| mysql |
+----------+
3 rows in set (0.01 sec)

mysql> use dbcbo;
Database changed
mysql> show tables;
ERROR 12: Can't read dir of './dbcbo/' (Errcode: 13)
mysql>


If I restart the mysqld server, I have no problems. The database is there and the data is not corrupted either. But after a while(usually less than several hours), the same thing happens again. I need a long term solution to this problem.

Thanks.
 
Old 10-02-2001, 10:22 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
mysql will create a directory in the mysql/var directory for each database that you create.

It sounds to me like the permissions on that directory are being changed. Error 13 is usually a permissions error in UNIX land. The permissions on my database directories are 700 for the directories and 660 for the database files. Everything is owned my mysql.mysql .

Who are you mysql daemons running as? Next time you see this problem. Check the ownership and permissions of the directories and check to see who the mysql daemons are running as.

Gary
 
Old 10-03-2001, 09:24 AM   #3
happywht
LQ Newbie
 
Registered: Oct 2001
Posts: 2

Original Poster
Rep: Reputation: 0
I always run the mysql daemon as root. I checked the directories settings and they are correct. i didnt' make any changes to the permissions.

This is a weird problem. I think it is probably because the mysql
database crashes. Maybe I should restart the database every few days. It has been fine in the past few days...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MYSQL data dir android6011 Linux - Software 22 10-10-2005 09:32 PM
JAVA and Oracle errorcode 17008 ushradha Programming 0 11-02-2004 06:31 AM
trying to get files off of drive a: cant seem to read dir of a windows formated flopp laurenaj Linux - Newbie 0 05-12-2004 04:44 PM
MYSQL on Slackware9.0 ./mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13) Litn Linux - Software 2 09-02-2003 09:00 PM
RH9+Mysql can read cannot write ivankong Linux - Software 2 06-10-2003 03:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration