[one-users] OpenNbula 3.0 migration: problem with onedb

Carlos Martín Sánchez cmartin at opennebula.org
Tue Oct 18 03:58:39 PDT 2011


Hi,

Is the DB in the new machine correctly populated?
Can you manually perform a "select * from user_pool where oid=0;" ?

I'm asking because the '-p' option of the mysql commands needs the password
right next to it, without any space; i.e. '-popennebula' instead of '-p
opennebula'


In case any other user is in a similar situation, you can use the onedb
command to move the DB to the new mysql server using "onedb backup" and
"onedb restore".

Regards.
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org <http://www.opennebula.org/> | cmartin at opennebula.org


On Tue, Oct 18, 2011 at 12:35 PM, Ruben Diez <rdiez at cesga.es> wrote:

> Hi:
>
> We are attempt to migrate OpenNebula from 2.1.80 to 3.0....
>
> But the new 3.0 OpenNebula was installed in a new machine.
>
> For database migration, we have followed these steps:
>
> 1- In the old machine, we made a dump of the database:
>
> mysqldump -h localhost -u oneadmin -p opennebula
> >opennebula_2_database.mysq
>
> 2- In the new machine, we create the oneadmin user, an empty opennebula
> database and grant privileges to user oneadmin on database opennebula:
>
> mysql> create user 'oneadmin'@'localhost' identified by 'XXXXX';
> mysql> create database opennebula;
> mysql> grant all privileges on opennebula.* to 'oneadmin'@'localhost';
>
> 3- Now, in the new machine, we restore the 2.1 version database:
>
> mysql -h localhost -u oneadmin -p opennebula <opennebula_2_database.mysql
>
> 4- The configuration of the database is set in the oned.conf file:
>
> DB = [ backend = "mysql",
>       server  = "localhost",
>       port    = 0,
>       user    = "oneadmin",
>       passwd  = "XXXXX",
>       db_name = "opennebula" ]
>
> 5- Now, we attempt the database conversion: but it fails:
>
> #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v
>      Database schema does not look to be created by OpenNebula: table
> user_pool is missing or empty.
>
>
> We attempt to avoid oned.conf file, but also fails:
>
> #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v  -u oneadmin -d opennebula
>   MySQL Password:
> MySQL option DBNAME is needed
>
> #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v  -u root -d opennebula
> MySQL Password:
> MySQL option DBNAME is needed
>
> #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v -P 3306 -S localhost -u
> oneadmin -d opennebula
> MySQL Password:
> MySQL option DBNAME is needed
>
>
> Any ideas about why the database migration fails??
>
> Regards....
>
> ______________________________**_________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20111018/09821e4f/attachment-0002.htm>


More information about the Users mailing list