|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
you might want to post this in the mysql forum
|
|
#3
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > MySQL newbie please help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|