PDA

View Full Version : Cannot continue without a datbase connection


Castle2.0
02-12-2015, 02:00 AM
Hi, this is my first server. I did the whole setup pretty carefully.

When I run world.exe from the cmd line within EQemuserver folder I get


[World Server] Loading server configuration..
[World Server] CURRENT_VERSION: 1.1.3
[World Server] Added loginserver login.eqemulator.net:5998
[World Server] Connecting to MySQL...
[World Server] Cannot continue without a database connection.


I checked mysqld.exe is running so I'm not sure what the problem may be. Any feedback would be hugely appreciated!

vsab
02-12-2015, 04:39 AM
is it connecting to 127.0.0.1 or localhost in your config? If it's using one, try the other.

Castle2.0
02-12-2015, 05:43 AM
Vsab, thank you for your reponse! Just to come the details.


<tcp ip="127.0.0.1" port="9000" telnet="disable"/>

...

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


Would I change all these instances of 127.0.0.1 to localhost?

Update: I can get all the boxes to pop up for all the main .exe, but I couldn't see it on the server select. That's why I just ran world.exe as requested and I get that message. Even with localhost in those spots I get the same message.

vsab
02-12-2015, 07:06 AM
in the command prompt, type:
mysql -ueq -peq eq

What happens?

Castle2.0
02-12-2015, 09:41 AM
I hit Start on XAMPP Control Panel next to MySQL so it's running. Then I hit shell to open the command prompt. I try it on a regular command prompt with the same result.


Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'eq'@'localhost' (using password: YES)

epilz
02-12-2015, 10:51 AM
Had similar issues on my first install when I used XAMPP. Try this:

mysql -ueq -p

You will be prompted for your password. Once you are at mysql prompt, type:

use eq;

Castle2.0
02-12-2015, 11:28 AM
ERROR 2003 (HY000) can't connect to MySQL server on 'localhost' (10061)


It gives me this.

vsab
02-12-2015, 11:30 AM
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'eq'@'localhost' (using password: YES)


Either you didn't create a user called "eq" in mysql, or the password isn't "eq". Do you remember the password you used when you created the user?

The command epilz mentioned is good if you want to try to guess your password if not.... ;)

Failing that try to log in as root. Hopefully you remember that password :)
mysql -uroot -p

Castle2.0
02-12-2015, 12:11 PM
Logging in as root is no problem, but apparently the eq//eq username//pass doesn't work.

I never created eq user, but that was in the eqemu_config.xml.full that I renamed eqemu_config.xml.

Ok in that xml I changed the name to root and the password to the password I use.

Now it actually works! So I backup, then install updates, and then? How do I get it onto the login server?


UPDATE: After backup and updates I hit 0 for exit then I get some [World Server] text.

Could not load item data, but ignoring.
...
Could not load skill cap data, but ignoring.


This doesn't sound good...

But I got it onto the server select now, hurray!

I did it! Any other problems I'll make a separate thread because this one is solved. I am finally on the server select and in game!

Valorborn
03-06-2015, 08:39 AM
I started a new build today and I am experiencing the same issues as OP.

I did not have any luck changing loop back to localhost though. I did the 'mysql -ueq -p' command and resulted in no user being found. I think it actually said that the column was empty. I ran two commands while logged into root on mysql.

CREATE USER 'eq'@'localhost' IDENTIFIED BY 'eq';

and

GRANT ALL PRIVILEGES ON * . * TO 'eq'@'localhost';

Now when I run mysql -ueq -peq eq I get "ERROR 1049 (42000): Unknown Database 'eq' but if I run mysql -ueq -peq it brings me to a mysql prompt and then if I type in mysql -ueq -peq eq it gives me a -> tabbed over and doesn't allow me to quit, exit, stop, restart, back, or any other vulgarity I type into it so I have to close the window.

I was able to access the database from a new command prompt as -ueq -peq and If I try to manually run world.exe I get:

c:\EQ\EQEmuServer>world.exe
[World Server] Loading server configuration..
[World Server] CURRENT_VERSION: 1.1.3
[World Server] Added loginserver login.emulator.net:5998
[World Server] Connecting to MySQL...
[World Server] Cannot continue without a database connection.


Respectfully,

joligario
03-06-2015, 08:58 AM
Looks like you are getting confused.
-u = user (eq in your case)
-p = password (eq in your case)
The final entry is the database name (you didn't specify, but I assume peq)

So your final login (if the database name is peq) is mysql -ueq -peq peq

Valorborn
03-06-2015, 09:11 AM
Looks like you are getting confused.
-u = user (eq in your case)
-p = password (eq in your case)
The final entry is the database name (you didn't specify, but I assume peq)

So your final login (if the database name is peq) is mysql -ueq -peq peq

Right! When I run mysql -ueq -peq peq it brings me to the mysql prompt but when I try to run world.exe I still get the database connection issue.

Valorborn
03-06-2015, 09:16 AM
This is my current eqemu_config.xml file config (I changed 127.0.0.1 to localhost like suggested before and I tried changing it back to 127.0.0.1 before submitting this reply to make sure. I also tried changing the eq user/pass to root/pass but It was the same).

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

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

vsab
03-06-2015, 09:53 AM
If you followed http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide&frm=Main correctly then you named your database "peq". The fact that "mysql -ueq -peq peq" works verifies that you have.

If that is the case, you must point your config file to use the database called peq, as it is currently looking for a database called "eq":-

Change
<db>eq</db>
to
<db>peq</db>

Bamzal
03-06-2015, 01:00 PM
that windows guide is put together well, and a great resource, but I noticed it fell short when describing the config file. It's counterintuitive by telling users to delete the basic config file and use the .full config file, but then just links to some other wiki page describing each field. The guide should hold your hand through that part just like it does with the rest, especially since the defaults in that file do not match what the guide tells you to do (see above for the database name as one example of this).


Other than that, it was a really great guide.

Valorborn
03-06-2015, 08:07 PM
If you followed http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide&frm=Main correctly then you named your database "peq". The fact that "mysql -ueq -peq peq" works verifies that you have.

If that is the case, you must point your config file to use the database called peq, as it is currently looking for a database called "eq":-

Change
<db>eq</db>
to
<db>peq</db>

I can see why the config file wouldn't work with that (I looked at the <db>eq</db> line several times yesterday and didn't make the connection) but how would the config file affect me opening a command prompt and trying to manually start world.exe?

Thank you

joligario
03-06-2015, 08:51 PM
Because world reads from that file. If it is wrong, it won't know where to get the data.

Valorborn
03-06-2015, 09:06 PM
Change made but it still doesn't launch, here is my current config, but now with the database being peq I'll retry the previous troubleshooting so will probably work. Thank you guys for the help.

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

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

Valorborn
03-06-2015, 09:12 PM
So just to clarify. The database didn't appear to have a user/pass of eq/eq so once I created the user and granted them privileges all that was left was to change the <db>eq</db> tag in the config file to <db>peq</db>. I haven't logged in yet, but I'll edit this portion of the post as progress is made. Thank you guys very much for helping me. Just wish I hadn't bothered you guys with something that turned out to be so obvious.

epilz
03-06-2015, 10:27 PM
its those small things that get overlooked. I have been in your shoes before while learning this

Korr
10-25-2016, 08:17 AM
Guide itself is good but there are holes.

- There is no mention of creating a user for SQL.

- Outdated information forces people to look elsewhere for files, those files may or may not work properly (i.e. maps and quests, I ended up using eqemu_update.pl to get them, but what are all those other options and which are safe to use?)

- After installing XAMPP, you have to launch it and start MySQL, it does not (by default) run automatically. Obviously must be done before executing any sql commands.

I fixed the cannot continue error thanks to these forums, but I'm getting path does not exist errors all over the place now. Not sure how far back in the install I have to go to resolve them.

Comments are most welcome and would be appreciated.

NostalgiaEQ
10-27-2016, 05:05 AM
It seems support for the old method has been dropped in favor of the new akka installer. Have you tried that?

Scorpious2k
10-27-2016, 06:11 AM
It seems support for the old method has been dropped in favor of the new akka installer. Have you tried that?

Really? I thought that was just for newbs. Or is that what you meant, that the newbie method is now the installer?

I think both methods should be supported. The "training-wheels" level installer method and the classic method which is harder but at least after you get the server up using it you've learned something in the process.

“You can't make anything idiot proof because idiots are so ingenious.”
- Ron Burns

DanCanDo
10-27-2016, 06:52 AM
Yes, what Scorpius said, plus a few cents more......
Nothing has been dropped from doing it the old way, other than someone who needs
the ease of the installer, but once you learn the "old way", it's a lot easier than you
think, it's just a matter of paying attention to detail (in what you're doing), rather than
missing tiny little typo's that can bring your whole setup to a halt.
Anyone who has got used to doing it the manual way, it can all be done in a matter of
minutes, once the initial programs are installed. (VS, Cmake, Perl, Mysql).
I use Navicat to access and edit database, and Notepad++ to edit text files, such as
configs and quest scripts, etc. It really is a lot of fun for me, even when I screw up :P

NostalgiaEQ
10-27-2016, 07:14 AM
Hmm ya but for tough issues like this I think step #1 for troubleshooting would be to try the installer ;).

The problem is these programs keep updating versions like visual studio and things simply stop working because you can't get the exact versions referenced in the guide. If you know what your doing and have it working the old way by all means keep doing it but I'm not sure anyone is trying to keep the instructions up to date and functional when they could just refer someone to the installer.

This is just my opinion from what I've seen I'm not a dev and don't have any inside info and am probably wrong lol.

DanCanDo
10-27-2016, 07:19 AM
I will agree, some wiki's and guides could be updated, but they get a little dusty now,
since the injection of the installer, which really is meant to help people who don't yet
have the knowledge for the manual install.