Hi Micheal
  Thanks for your suggestions. I use mysqldump to restore the DB's. Apparently 
mysqldump doesn't create forward declarations for views. So I had to manually 
feed the views in correct order to avoid errors. Also to import the DB sfg into 
sfgnew I had to substitute all of the `sfg` patterns with `sfgnew`. As you may 
guess, I don't intend to this often. Why can't we have a tool that copies one 
DB into another? BTW, I tried create table with select and it didn't work.
   
  

Michael Stassen <[EMAIL PROTECTED]> wrote:
  murthy gandikota wrote:

> Here are some pertinent facts:
> a) stopped mysqld
> b) copied files from sfg to sfgnew in the var directory
> c) set the permissions to 777 (read, write, execute) for all the files in 
sfgnew
> d) restarted mysqld

Dan Buettner wrote:
> Murthy, do you have appropriate permissions (777 works, or 775/770 if
> owned by mysql user) on your new directory ('sfgnew')? If you don't
> have execute permission for the mysql user on that dir, MySQL can't list
> the contents ...

murthy gandikota wrote:
> Hi Dan
> I've set the permissions to 777 for all the files and directories.
> Basically I did chmod -R 777 sfgnew. Also changed the ownership to
> mysql using chown -R mysql:mysql sfgnew.
>
> Thanks!

No, no, no! That's using a shotgun to kill a gnat. This idea of "fixing" a 
problem by setting permissions on mysql's data to "wide open" keeps coming up. 
It may work, but it's not a good idea.

There is no reason that normal users should have *any* access to mysql's data 
directory and files. They most certainly should not have write access! You may 
not even need group access to the data directory, unless you specifically want 
to give a user or users other than mysql the ability to perform specific tasks 
(read the error log, for instance), in which case you should give the group the 
minimum permission needed.

For typical use, permissions should be 750 for the data directory and its 
subdirectories, and 660 for files in the directories. That's sufficient and 
relatively safe. Never set your permissions more open than that unless you are 
certain you know what you are doing.

Michael

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to