Hi,<br><br>
Is the DB in the new machine  correctly populated?<br>Can you manually perform a "select * from user_pool where oid=0;" ?<br><br>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'<br>

<br><br>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".<br><br>Regards.<br><span style="border-collapse:collapse;color:rgb(136, 136, 136);font-family:arial,sans-serif;font-size:13px">--<br>

Carlos Martín, MSc</span><font color="#888888"><br>Project Engineer</font><br><span style="border-collapse:collapse;color:rgb(136, 136, 136);font-family:arial, sans-serif;font-size:13px"><span style="background-color:rgb(255, 255, 204);color:rgb(34, 34, 34);background-repeat:initial initial">OpenNebula</span> - The Open Source Toolkit for Cloud Computing<br>

<a href="http://www.opennebula.org/" style="color:rgb(42, 93, 176)" target="_blank">www.<span style="background-color:rgb(255, 255, 204);color:rgb(34, 34, 34);background-repeat:initial initial">OpenNebula</span>.org</a> | <a href="mailto:cmartin@opennebula.org" style="color:rgb(42, 93, 176)" target="_blank">cmartin@<span style="background-color:rgb(255, 255, 204);color:rgb(34, 34, 34);background-repeat:initial initial">opennebula</span>.org</a></span><br>


<br><br><div class="gmail_quote">On Tue, Oct 18, 2011 at 12:35 PM, Ruben Diez <span dir="ltr"><<a href="mailto:rdiez@cesga.es">rdiez@cesga.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

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