Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of /warp import pre3-mysql is not working. #36

Closed
veteranmina opened this issue Mar 13, 2015 · 14 comments
Closed

Use of /warp import pre3-mysql is not working. #36

veteranmina opened this issue Mar 13, 2015 · 14 comments
Assignees
Labels
t: question A usability question.

Comments

@veteranmina
Copy link

When attempting to import the old mysql database, which the schema was renamed to mywarpold, it states it cannot connect to the database. At first I thought I had a typo and re-checked it a few times, all good. So tried again and it still fails.

Looking at logs, this is all it gives me to deal with:

CONSOLE: [INFO] Import started. This may take some time...
7:47:36 PM CONSOLE: [INFO] Could not establish database connection in order to import warps: Failed to connect to the database.

This is the exact command that I am typing (minus user/pass)

/warp import pre3-mysql jdbc:mysql://localhost/mywarpold user pass warpTable

I have tried multiple times to get this to work, but it does not want to import itself to the new database.

@TheE TheE added the t: question A usability question. label Mar 13, 2015
@TheE TheE self-assigned this Mar 13, 2015
@TheE
Copy link
Member

TheE commented Mar 13, 2015

Are you sure that the DSN is correct? Perhaps your MySQL server listens to a non standard port that needs to be given too?

Perhaps I should add some more debug output, the current error is not really specific.

@veteranmina
Copy link
Author

It is the correct DSN, as it connects to the new database using the exact same DSN in the configuration. The port is also using the standard 3306 port. This is why I was stumped when it kept giving me this error.

@TheE
Copy link
Member

TheE commented Mar 13, 2015

I just tested it with my setup and it works as expected. Are you using an older devBuild? There was a similar bug, but that has been fixed.

@veteranmina
Copy link
Author

I was using build #33 to upgrade. I can attempt to use a newer version to see if that works. The reason I had used that version was due to build#34 had the potential break.
(disregard the link to #33 it auto-linked that)

@TheE
Copy link
Member

TheE commented Mar 13, 2015

No, it should work fine with build#33, I just tested it. (Updating is still encouraged.)

Another guess: You mentioned that you renamed the scheme. Have you checked if the user, you are using to connect with the database, has the rights to access that scheme and use SELECT?

@veteranmina
Copy link
Author

I had used root to create and then access the database, I can double check once I get off work to see.

I do have a second account that i use afterwards to keep root private, i'll check that account as well.

Could possibly dropping the db and restoring under a different name have anything to do with it?

@TheE
Copy link
Member

TheE commented Mar 13, 2015

I doubt it because even if, it should not matter for root.

I just pushed a new devBuild that should actually show the SQL error that happened. If you test it, please post the exact output of using the command you posted above, it might give us an idea about the cause.

@TheE
Copy link
Member

TheE commented Mar 13, 2015

I just got a mail with the comment you removed (the MySQL Workbench image). I noticed that there is no schema named mywarpold, there is only warp and mywarp and I assume that the later on is the new one.

Is this intentional, have you tested /warp import pre3-mysql jdbc:mysql://localhost/warp user pass warpTable?

@veteranmina
Copy link
Author

Sorry about that, I removed it after i noticed you had just posted the new devBuild. The one called warp is the old one, i had changed the name and had also tried with it as well. I am currently getting the new dev build on the server.

@veteranmina
Copy link
Author

Quite interesting, i uploaded the new build40 and ran this command:

/warp import pre3-mysql jdbc:mysql://localhost/warp user pass warpTable

It worked perfectly importing all warps.

Now my question about skipped warps, if i run it again when the user has logged in at least once, will it import it then?

@TheE
Copy link
Member

TheE commented Mar 13, 2015

Strange, maybe you were (without knowing) running a build older than 52cc629 (build17).

Anyway, I am glad that it is working now.

@TheE TheE closed this as completed Mar 13, 2015
@veteranmina
Copy link
Author

Could have thought i had the right one, but in the end thank you very much for the support!

@TheE
Copy link
Member

TheE commented Mar 13, 2015

And, to answer the last question: Warps are skipped for four reasons:

  1. Important data is missing, for example location or name. There is absolutely nothing that can be done in that case.
  2. The warp cannot be connected with a loaded world, which means there is no world with a name as stored in the old database. This can be fixed by renaming an existing or creating a new world with such a name.
  3. No unique ID can be found for the player who created the warp. The names are resolved directly from Mojang's servers when importing. If these do not know a player, he might either have changed his name (?) or has no paid account. In both cases, there is nothing that could be done.
  4. The warp is exported successfully, but a warp with that name already exists which is why it cannot be imported. Simply remove or rename the existing warp and it should work fine.

In every case, you should see precise information about what is going on logged to the console.

@veteranmina
Copy link
Author

Alright makes sense, again thank you very mush for the support. It's nice to see developers like yourself this helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: question A usability question.
Projects
None yet
Development

No branches or pull requests

2 participants