Jump to content

Recommended Posts

Posted

Hey Guys -

I apologize if this has been answered before, I couldn't find any documentation on this subject. I just got a mangoszero server up and running locally, during the installation I couldn't find a way to use PostgreSQL instead of MySQL, I did some research and found that one of your milestones which was achieved not long ago said you have Postgres support now.

I tried using the SQL dumps included to import but those are MySQL specific it seems and just gives me errors if I try on my Postgres database. Thanks again!

Ricky

Posted
Maybe someone other could solve this directly, but generally it would be helpful to post this error messages.

The SQL in the file just isn't right to import..

postgres@ubuntu:~/data/sql$ psql -d characters -f characters.sql

psql:characters.sql:22: ERROR:  syntax error at or near "`"
LINE 1: DROP TABLE IF EXISTS `character_db_version`;
                            ^
psql:characters.sql:27: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `character_db_version` (
                    ^
psql:characters.sql:34: ERROR:  syntax error at or near "`"
LINE 1: LOCK TABLES `character_db_version` WRITE;
                   ^
psql:characters.sql:36: ERROR:  syntax error at or near "`"
LINE 1: INSERT INTO `character_db_version` VALUES
(NULL);
                   ^
psql:characters.sql:38: ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
       ^
psql:characters.sql:44: ERROR:  syntax error at or near "`"
LINE 1: DROP TABLE IF EXISTS `auction`;
                            ^
psql:characters.sql:59: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `auction` (
...
...
...

Posted

After a short check it seems to be that Postgre have a problem with the "`", if you use "´" or simply nothing to bracket the value, it makes no more syntax error at the specific value, however in following commands like the "engine=MyISAM". In this case I could not comprehend how a single sql file could be comatible to MySQL and Postgre at the same time, even if it should after your investigate.

Posted
After a short check it seems to be that Postgre have a problem with the "`", if you use "´" or simply nothing to bracket the value, it makes no more syntax error at the specific value, however in following commands like the "engine=MyISAM". In this case I could not comprehend how a single sql file could be comatible to MySQL and Postgre at the same time, even if it should after your investigate.

I understand this completely, like I said...the SQL is for MySQL, it's not transversal. I guess my question is, if mangos supports PostgreSQL...then where do I find the correct SQL files?

Posted

in contrib/mysql_to_pgsql stored tool that convert mysql-way-writed files in sql dir to postgre compatible format

Not forgot also run sql/postgre_compatibility_addon.sql at least single time for your porgre DB(s) for make some in-core-code queries working also at posgresql server

Posted
in contrib/mysql_to_pgsql stored tool that convert mysql-way-writed files in sql dir to postgre compatible format

Not forgot also run sql/postgre_compatibility_addon.sql at least single time for your porgre DB(s) for make some in-core-code queries working also at posgresql server

Exactly what I needed, thank you!!!

Posted

Do you have to use unix_sockets with Postgres? Is there a way to tell the realmd binary that I"m using postgres, because it's just hanging when connecting to the database. Thanks

edit:

Found what I was looking for in the mangos conf file, I think the same should be reflected in the realmd conf

#        Database connection settings for the world server.
#        Default:
#                ---MYSQL---
#                    hostname;port;username;password;database
#                    .;somenumber;username;password;database - use named pipes at Windows
#                        Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini
#                    .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux
#                ---PGSQL---
#                    hostname;port;username;password;database
#                    .;/path/to/unix_socket/DIRECTORY or . for default path;username;password;database - use Unix sockets at Unix/Linux

I changed it to the correct settings

127.0.0.1:5432:postgres:mangos:realmd

still hanging...weird

  • 1 month later...
Posted
Do you have to use unix_sockets with Postgres? Is there a way to tell the realmd binary that I"m using postgres, because it's just hanging when connecting to the database. Thanks

edit:

Found what I was looking for in the mangos conf file, I think the same should be reflected in the realmd conf

#        Database connection settings for the world server.
#        Default:
#                ---MYSQL---
#                    hostname;port;username;password;database
#                    .;somenumber;username;password;database - use named pipes at Windows
#                        Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini
#                    .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux
#                ---PGSQL---
#                    hostname;port;username;password;database
#                    .;/path/to/unix_socket/DIRECTORY or . for default path;username;password;database - use Unix sockets at Unix/Linux

I changed it to the correct settings

127.0.0.1:5432:postgres:mangos:realmd

still hanging...weird

I have the same problem.

Core runs under windows 64bit

Postgre-Server 9.0.3 under Ubuntu 64bit.

GreeZ

TuX

PS: i have excuted postgre-compatibilty_addon.sql ;)

×
×
  • 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