Make a backup of the current database.
mysqldump -u charith -p --databases trac > dbdump.sqlThen I copy it to the target machine and import it and create a new database called "trac" and allow permission to user charith,
grant all privileges on trac.* to charith@localhost identified by 'password';I tried to use mysqlimport command,
mysqlimport trac --replace --user=root dbdump.sqlmysqlimport: Error: Table 'trac.dbdump' doesn't exist, when using table: dbdump
But I was able to import it successfully as root by,
mysql trac < dbdump.sqlBut, still trac give the following error: "The 'repository_dir' has changed, a 'trac-admin resync' operation is needed".
So I synchronize the repository by,
trac-admin /path/to/env/ resyncFinally, I was able to import the data to the new environment.
No comments:
Post a Comment