database permissions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    #1

    database permissions

    Hello,
    I've got databases on one box i have to
    transfer to another box, both are running Linux one a Centos4 machine, the
    other rh9 i think. I could tar up the /var/lib/mysql directory, but i
    was lead to believe that was a bad idea. I don't know the permissions of the
    user's and i don't want to give out global permissions. What i was wondering
    is there a way i can do a mysqldump on the databases on machine1, which will
    drop everything needed to recreate them in to a .sql file, transfer that to
    machine2 and then use mysqladmin to load it and have all the settings back
    in business? I believe they're both mysql4 installs, though machine1 might
    be mysql3.23, not sure.
    Thanks a lot.
    Dave.


  • Bill Karwin

    #2
    Re: database permissions

    On Mon, 27 Mar 2006 23:37:21 -0800, Dave <dmehler26@woh. rr.com> wrote:
    [color=blue]
    > is there a way i can do a mysqldump on the databases on machine1, which
    > will drop everything needed to recreate them in to a .sql file, transfer
    > that to machine2 and then use mysqladmin to load it and have all the
    > settings back in business?[/color]

    The users and privileges are all recorded in the "mysql" database (that
    is, a database named "mysql"). You should be able to back this up using
    mysqldump on machine1, and restore it on machine2 using the mysql
    command-line tool to run the backup as a SQL script.
    [color=blue]
    > I believe they're both mysql4 installs, though machine1 might
    > be mysql3.23, not sure.[/color]

    The schema of the mysql database changes from release to release.
    You may need to run the "mysql_fix_priv ilege_tables" script to upgrade the
    schema after you restore it.

    See
    http://dev.mysql.com/doc/refman/4.1/...ge-tables.html

    Regards,
    Bill K.

    Comment

    Working...