Jump to content
  • 0

InstallDatabases giving syntax error


thersr6386

Question

This is with the most recent pull from git, encountered this when setting up a new server.

Had set up a server a week or two ago and databases installed fine, same configs, same OS (windows), etc.

Creating Character Database character0

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */' at line 1

Creating Realm Database realmd

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */' at line 1

The World database creates fine.

As far as I can tell the syntax looks ok in the actual files.

Using MySQL server 5.6, happens in Win7/10/2008R2.

Did a bit of troubleshooting, MySQL 5.5, 5.6, and 5.7 give the same error, editing the database full install file in notepad and attempting to remove any possible invisible characters also did not work.

Also tried manually loading the database in HeidiSQL and got the same error @ line 1.

Tried in a clean VM and got the same results.

Following the temp compile guide a few threads down.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Still no idea what the problem is but a workaround that was working for a bit was to use the MySQL workbench to manually import the database.

However this also fails later down the chain when trying to import a table.

Something else I tried was copy/paste the raw directly from github but that didn't work properly either.

Previous commits don't give the syntax error, but rather have issues with the realm DB:

Creating Character Database character0
Loading Character Database character0
Creating Realm Database realmd
Loading Realm Database realmd
The system cannot find the path specified.

Adding RealmList entry in Realm Database realmd
--------------------------------------------------
ERROR 1146 (42S02) at line 6: Table 'realmd.realmlist' doesn't exist
--------------------------------------------------

Is the repo broken for the time being?

Link to comment
Share on other sites

This thread has been solved.

So it looks like it was an encoding issue (or still is possibly?) with the character, specifically the character, initial load DB. The realmLoadDB.sql file also had this problem in the last pull but is fixed(?) now.

Looks like the problem was related to an invisible character caused by a BOM, that is the """" that was the first character inside of the quotes for where the error is.

The temp workaround I found was to open "characterLoadDB.sql" in Notepad++, select all, and change the encoding to just plain UTF-8 rather than UTF-8 BOM which is what it is set to when downloaded.

Fairly certain this is a repo issue since this issue happened on a clean EN-US windows install and was not present a few commits ago. But I'm not 100% on that.

In any case, if anyone else has this issue, there's the fix.

Link to comment
Share on other sites

Part of the problem is that the files need to be encoded in UTF8 - HeidiSQL doesn't seem to support UTF8 correctly.

I initially changed the encoding to ansi which made things work in Heidi, but broke the actual data.

- Because of this I had to change the encoding back to UTF8.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use