Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 23rd, 2003, 03:59 PM
kostas kostas is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 3 kostas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MySQL newbie please help

Good day,

After completely loosing my server I am left with all my databases in my old drive in /old_drive/home/mysql

I tried copying frm, MYD, MYI files into the new directory /home/mysql but it doesn't work

I can see the database and its talbes in phpmyadmin, I can even see all the files from the command line.

When I click on a table (in phpmyadmin) I get:

Can't find file: './db_name/table_name.frm' (errno: 13)

I see this even after restarting MySQL.

I was told that error number 13 means there is a permission error, MySQL can not read or write the database table files and that I should check the ownership of the files and what MySQL is running as, usually the owner is 'mysql', and not 'root'

I have no idea on how to check the above but I looked at some documentation and have the following questions:

Do I need to do the following?

shell> UMASK=384 # = 600 in octal
shell> export UMASK
shell> /path/to/safe_mysqld &

and in order to do the above:

1. What is the correct path for safe_mysqld?
2. Is it better to use the following for all future directories?

shell> UMASK_DIR=504 # = 770 in octal
shell> export UMASK_DIR
shell> /path/to/safe_mysqld &

Also how do I change the ownership of the directory?

Am I going the wrong way about it?

Regards

Reply With Quote
  #2  
Old March 6th, 2003, 08:45 PM
mttatkns mttatkns is offline
Got source?
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Mar 2003
Location: Laguna Niguel, California, USA
Posts: 2,332 mttatkns User rank is Private First Class (20 - 50 Reputation Level)mttatkns User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
you might want to post this in the mysql forum

Reply With Quote
  #3  
Old March 6th, 2003, 09:58 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
Stop the MySQL daemon.

change to the directory directly above your MySQL directory, and then:

chown -R mysql.mysql mysql_data_directory/

where the "mysql.mysql" part is the user/group that MySQL runs as and "mysql_data_directory/" is the directory that all the MySQL tables are stored in. If you're on linux with a default install, it should be exactly the above command.

You should then probably "optimize" all your tables, just to make sure they indeces are working properly, either use optimize directly in the shell or check out "myisamchk" from the command line.

And yes, this probably should've gone in the MySQL forum.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > MySQL newbie please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT