PDA

View Full Version : Unable to connect to database


Bandor
05-19-2014, 12:31 PM
Followed the Wiki guide 100% with 0 problems. Went to start my server and keep getting message unable to connect to database Error # 1045. Not sure what could be doing this so i redid my entire source code and still no connection. Not sure what else to do about it. Any suggestions would be great.

Hockyplr
05-19-2014, 12:52 PM
Please post your eqemu_config.xml and your Login.ini files, also best practice to user the code tags.

Bandor
05-19-2014, 07:20 PM
eqemu_config.xml is

<?xml version="1.0"?>
<server>
<world>
<shortname>setme</shortname>
<longname>I Forgot To Edit My Config</longname>

<!-- Only specify these two if you really think you need to. (read: You don't) -->
<!-- <address>some.server.com</address> -->
<!-- <localaddress>192.168.0.5</localaddress> -->

<!-- Loginserver information. Defaults shown -->
<loginserver>
<host>eqemulator.net</host>
<port>5998</port>
<account></account>
<password></password>
</loginserver>

<!-- Server status. Default is unlocked -->
<!--<locked/>-->
<!-- <unlocked/> -->

<!-- Sets the ip/port for the tcp connections. Both zones and console (if enabled). Defaults are shown -->
<tcp ip="127.0.0.1" port="9000" telnet="disable"/>

<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>some long random string</key>

<!-- Enable and set the port for the HTTP service. Defaults are shown -->
<http port="9080" enabled="false" mimefile="mime.types" />
</world>

<!-- Chatserver (channels) information. Defaults shown -->
<chatserver>
<host>channels.eqemulator.net</host>
<port>7778</port>
</chatserver>

<!-- Mailserver (in-game mail) information. Defaults shown -->
<mailserver>
<host>channels.eqemulator.net</host>
<port>7778</port>
</mailserver>

<zones>
<defaultstatus>20</defaultstatus>

<!-- Sets port range for world to use to auto configure zones -->
<ports low="7000" high="7100"/>
</zones>

<!-- Database configuration, replaces db.ini. Defaults shown -->
<database>
<host>127.0.0.1</host>
<port>3306</port>
<username>eq</username>
<password>eq</password>
<db>eq</db>
</database>

<qsdatabase>
<host>127.0.0.1</host>
<port>3306</port>
<username>eq</username>
<password>eq</password>
<db>eq</db>
</qsdatabase>

<!-- Launcher Configuration -->
<launcher>
<!-- <logprefix>logs/zone-</logprefix> -->
<!-- <logsuffix>.log</logsuffix> -->
<!-- <exe>zone.exe or ./zone</exe> -->
<!-- <timers restart="10000" reterminate="10000"> -->
</launcher>

<!-- File locations. Defaults shown -->
<files>
<!-- <spells>spells_us.txt</spells> -->
<!-- <opcodes>opcodes.conf</opcodes> -->
<!-- <logsettings>log.ini</logsettings> -->
<!-- <eqtime>eqtime.cfg</eqtime> -->
</files>
<!-- Directory locations. Defaults shown -->
<directories>
<!-- <maps>Maps</maps> -->
<!-- <quests>quests</quests> -->
<!-- <plugins>plugins</plugins> -->
</directories>
</server>




Login.ini is


[database]
host = localhost
port = 3306
db = eqemu
user = user
password = password
subsystem = MySQL

[options]
unregistered_allowed = TRUE
reject_duplicate_servers = FALSE
trace = TRUE
world_trace = FALSE
dump_packets_in = FALSE
dump_packets_out = FALSE
listen_port = 5998
local_network = 192.168.1.

[security]
plugin = EQEmuAuthCrypto
mode = 5

[Titanium]
port = 5998
opcodes = login_opcodes.conf

[SoD]
port = 5999
opcodes = login_opcodes_sod.conf

[schema]
account_table = tblLoginServerAccounts
world_registration_table = tblWorldServerRegistration
world_admin_registration_table = tblServerAdminRegistration
world_server_type_table = tblServerListType

Bandor
05-19-2014, 07:21 PM
I realize after posting this that I never edited my config,that might have something to do with that lol. /headslap


Not really sure how to edit all that,didn't see any directions on doing so.

vsab
05-20-2014, 03:57 AM
http://wiki.eqemulator.org/p?eqemu_config.xml&frm=Main

Maze_EQ
05-20-2014, 06:10 AM
<!-- Database configuration, replaces db.ini. Defaults shown -->
<database>
<host>127.0.0.1</host>
<port>3306</port>
<username>eq</username> !!!PUT USERNAME HERE!!!
<password>eq</password> !!!PUT PASSWORD HERE!!!
<db>eq</db>
</database>

<qsdatabase>
<host>127.0.0.1</host>
<port>3306</port>
<username>eq</username> !!!PUT USERNAME HERE!!!
<password>eq</password> !!!PUT PASSWORD HERE!!!
<db>eq</db>

Common sense is a beautiful thing.

lerxst2112
05-20-2014, 06:13 AM
You forgot "!!!PUT DATABASE NAME HERE!!!" since most of the guides recommend naming it peq.

Bandor
05-20-2014, 08:32 AM
Ya renaming the db had me confused. Renamed it,resourced it,and got it configed seem to be in business now

Bandor
05-20-2014, 08:42 AM
Server is up but Im not seeing it available on server list,not sure what could be causing this

vsab
05-20-2014, 09:06 AM
List on the website or server list when you log in?

If it's the former then AFAIK you can't add new servers to it at the moment.

If it's the latter, ensure your firewall settings are correct, and check you have followed the wiki in regards to the settings e.g.


<loginserver>
<host>login.eqemulator.net</host>
<port>5998</port>
<account></account>
<password></password>
</loginserver>

Bandor
05-20-2014, 10:13 AM
got it working,was missing one word lol. Thanks for the help everyone