Log in

View Full Version : I've got the #2 error while doing the guide


IK91
09-23-2008, 12:34 AM
Well, this sucks. :(


mysql> create database peq;
Query OK, 1 row affected (0,00 sec)

mysql> \u peq
Database changed

mysql> source load_player.sql
ERROR:
Failed to open file 'load_player.sql', error: 2

wayneg
09-23-2008, 12:57 AM
judging by the error message you didn't change your directory, you missed this part after the following line:

Click Start->Run-> and type in cmd to bring up your command prompt

Now type in cd\peqdb
You should be at C:\peqdb>

Now type in
mysql -u root -p

and type in your password (from the Instance Configuration Wizard)

You will now see something like this,
Welcome to MySQL monitor. Commands end with ; or \g
Your MySQL connection ID is 2
Server Version: 5.0.37-community-nt MySQL Community Edition <GPL>
Type help; or \h for help. Type \c to clear the buffer.
mysql>


If that is correct, you now need to type in the following commands, pressing enter after each line.
Note: changed in accordance with [http://eqemulator.net/forums/showthread.php?t=23536∞]
create database peq;
\u peq
source load_player.sql

IK91
09-23-2008, 01:23 AM
But I did do that. And what is "Instance Configuration Wizard", that threw me off quite a bit.

joligario
09-23-2008, 03:16 AM
Make sure you are in the directory where you extracted the load_player.sql file before you run mysql.

The instance configuration wizard helps you set up your username/password. Seeing as how you were already logged in, you don't have to worry about that part.

Just an FYI, you can add the database in the command line now that you have created one.

C:\peqdb\> mysql -u root -D peq -p

Calypso73
09-25-2008, 01:43 AM
I'm having the same problem as IK91. And I can't seem to find the load_player.sql file in the database or any folder. I'm just seeing 4 files. I may just try to do all over again.
If that doesn't solve it i'll post back.

joligario
09-25-2008, 03:06 AM
Who's database are you loading? In the PEQ database, it is there.

Calypso73
09-25-2008, 03:37 AM
I just reinstalled everything. I'm using the PEQ. I have all the files now, however the load_player.sql command I run is still giving me a error #2. Also what is the actual directory those files should be going to? Is peqdb or peq_db because it had asked me that the directory did not exist so I created it and put it into that folder(peqdb)

joligario
09-25-2008, 03:55 AM
It goes into whatever folder you want. The files just include code that helps to create the database. You can load them from any directory. Just as long as you change into that directory before executing the mysql -u root -p command.

Calypso73
09-25-2008, 04:32 AM
I don't know. I pretty much went right by what the info told on the server creation page. It just doesn't seem to be locating the load_player.sql file, although it's right there. Isn't there any way of extracting that without using the mysql command line? Otherwise I'm just going to try at a later time. Thx for the help though.

joligario
09-25-2008, 04:34 AM
You can do it manually or copy/paste.

Copy the block of code, right click the cmd window and select paste or you can manually type each line in... More prone to typos though.

Calypso73
09-25-2008, 11:19 PM
Well I give up. I've tried numerous times to set this up and always get stuck at the source load_player.sql . it just gives me "Failed to open file 'load_player.sql', error: 2"

I've also tried copying/pasting files to the command prompt window and get the same error. I remember setting up a server awhile back(2 yrs ago) and didn't have this trouble. Oh well, thx for the help though. I'll keep searching for some answers on the forum or other site

joligario
09-25-2008, 11:36 PM
Ensure all the tables are in the same folder as your load_player.sql and make sure your load_player.sql looks like this:

source aa_timers.sql;
source Banned_IPs.sql;
source account.sql;
source botinventory.sql;
source botleader.sql;
source botsowners.sql;
source character_.sql;
source character_backup.sql;
source commands.sql;
source eventlog.sql;
source faction_values.sql;
source group_id.sql;
source group_leaders.sql;
source guild_members.sql;
source guild_ranks.sql;
source guild_relations.sql;
source guilds.sql;
source hackers.sql;
source inventory.sql;
source launcher.sql;
source launcher_zones.sql;
source name_filter.sql;
source object_contents.sql;
source petitions.sql;
source player_corpses.sql;
source player_corpses_backup.sql;
source quest_globals.sql;
source rule_sets.sql;
source rule_values.sql;
source sharedbank.sql;
source timers.sql;
source variables.sql;
source zone_flags.sql;

Calypso73
09-25-2008, 11:59 PM
Yes it looks exactly like that, but when I paste it to the command prompt window, it just gives all files the failed to load error:2

Xenezie
09-26-2008, 02:14 AM
It looks to me that you've forgot to end your command with a ;

Try

source load_player.sql;

or

\. c:/YOURDIRECTORY/load_player.sql;

joligario
09-26-2008, 03:02 AM
But if he didn't end with a semi-colon, it wouldn't give him error 2 file not found. It would give him the ->.

Are you starting mysql from the directory where these .sql files are located?

start -> run -> cmd
C:\Documents and Settings\Your Name>cd \peq
C:\peq>cd peq_db
C:\peq\peq_db>dir
Volume in drive C has no label.
Volume Serial Number is ****-****

Directory of C:\peq\peq_db

09/21/2008 08:22 AM <DIR> .
09/21/2008 08:22 AM <DIR> ..
02/12/2008 10:17 AM 1,861 aa_timers.sql
02/12/2008 10:17 AM 2,272 account.sql
04/21/2008 03:07 PM 387 Banned_IPs.sql
02/12/2008 10:17 AM 1,755 botinventory.sql
02/12/2008 10:17 AM 1,722 botleader.sql
02/12/2008 10:17 AM 1,763 botsowners.sql
03/29/2008 03:17 PM 98 bot_npcs.bat
03/16/2008 04:40 PM 98 bot_npcs.sh
02/12/2008 10:17 AM 2,363 character_.sql
02/12/2008 10:17 AM 2,372 character_backup.sql
04/21/2008 03:07 PM 23,992 commands.sql
09/14/2008 10:34 AM <DIR> CVS
09/06/2008 02:26 PM 1,250 drop_player.sql
09/06/2008 02:26 PM 1,780 drop_system.sql
02/12/2008 10:17 AM 2,078 eventlog.sql
02/12/2008 10:17 AM 1,835 faction_values.sql
.....
.....
etc, etc, etc.

C:\peq\peq_db>mysql -u root -p
Enter password: ****

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51a Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>source load_player.sql;

Calypso73
09-26-2008, 04:46 AM
I'm a little confused by the commands given on your screen. How do I start mysql from the directory where my .sql files are located? I mean, what command am I putting in. I type the command: cd\peqdb which then puts me to C:peqdb> After that I type in: mysql -u root -p and then last I put in:

create database peq;
\u peq
source load_player.sql

In which I get the Failed to open file 'load_player.sql', error: 2

joligario
09-26-2008, 05:55 AM
Before you type in the "mysql - u root -p", type in "dir" and look if all those files are listed (aa_timers.sql, account.sql, load_player.sql, etc.).

Xenezie
09-26-2008, 10:33 AM
Right, I looked over that, and is partly why I posted that other little bit.


He needs to find the directory the file is in then do a:

\. c:/YOURDIRECTORY/load_player.sql;

example: c:/programs/peqdb/load_player.sql then just add in the rest.

This will have the same effect as navigating your command line there.

Calypso73
09-26-2008, 01:55 PM
This is what I get:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Willard>cd\peqdb

C:\peqdb>dir
Volume in drive C has no label.
Volume Serial Number is 9026-53CA

Directory of C:\peqdb

09/26/2008 01:24 AM <DIR> .
09/26/2008 01:24 AM <DIR> ..
09/26/2008 01:24 AM 0 cd
09/25/2008 06:57 PM <DIR> peq_db
1 File(s) 0 bytes
3 Dir(s) 187,759,304,704 bytes free

C:\peqdb>


What command should I be typing in next

Xenezie
09-26-2008, 02:16 PM
create database peq;

\u peq

source load_player.sql

Make sure you are pressing enter after each part.

joligario
09-26-2008, 06:49 PM
There's your problem! You have the peq_db within your peqdb folder.

I type the command: cd\peqdb....

Here you should be typing in "cd\peqdb\peq_db". Then try it. Have fun, you are on your way to having a server!