Jump to content

MaNGOS SQL problems Linux


Auntie Mangos

Recommended Posts

I need some help regarding to this thread: http://getmangos.eu/community/viewtopic.php?id=7839.

Step 6, I don't know what to do.

Step 6 - Setup the Database

There is a magic little command we use during the setup process, this makes things so much simpler.

~# mysql -p'YOUR PASSWORD HERE'

We will use this in place of a Windows/Mac MySQL application.

Create the MaNGOS database

~# mysql -p'YOUR PASSWORD HERE' < mangos/sql/create_mysql.sql
~# mysql -p'YOUR PASSWORD HERE' < ScriptDev2/sql/ScriptDev2_create_database.sql
~# mysql -p'YOUR PASSWORD HERE' ScriptDev2 < ScriptDev2/sql/ScriptDev2_create_structure_mysql.sql

Populate the database

~# mysql -p'YOUR PASSWORD HERE' mangos < mangos/sql/mangos.sql
~# mysql -p'YOUR PASSWORD HERE' characters < mangos/sql/characters.sql
~# mysql -p'YOUR PASSWORD HERE' realmd < mangos/sql/realmd.sql
~# mysql -p'YOUR PASSWORD HERE' ScriptDev2 < ScriptDev2/sql/ScriptDev2_script_full.sql

World Database

Download Database

This is strictly copy/paste for current, this will break in the future, i will try to keep this updated

~# wget [url]https://unifieddb.svn.sourceforge.net/svnroot/unifieddb/trunk/Full_DB/UDB_0.11.6_Core_8734_SD2_1480.rar[/url] [url]https://sd2-acid.svn.sourceforge.net/svnroot/sd2-acid/trunk/wotlk/3.0.1/3.0.1_acid.sql[/url] --no-check-certificate;unrar e UDB*;

Install Database

~# mysql -p'YOUR PASSWORD HERE' mangos < UDB_0.11.6_Core_8734_SD2_1480.sql
~# mysql -p'YOUR PASSWORD HERE' mangos < 3.0.1_acid.sql
~# mysql -p'YOUR PASSWORD HERE' mangos < /mangos/src/bindings/ScriptDev2/sql/mangos_scriptname_full.sql

Now apply MySQL updates. There is a list right after this post, you can follow it to update.

I'm having troubles with:

mysql -p'YOUR PASSWORD HERE' < mangos/sql/create_mysql.sql

when I run it without a semicolon, I just get a

 ->

when I run it with a semicolon (or do 'show databases;' after) it gives me:

ERROR 1064 (42000): 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 'mysql -u root -p'password' < mangos/sql/create_mysql.sql

substituted my password with password.

Link to comment
Share on other sites

  • 40 years later...
try this in console:

mysql -u 'yourname' -p < mangos/sql/create_mysql.sql

if your username is kareta it would be:

mysql -u kareta -p < mangos/sql/create_mysql.sql

you'll be asked for your password. Type it. It's not displayed for security reasons.

Wait.

Your done.

Yours

Skirnir

Got an error message

kareta@ubuntu:~$ mysql -u kareta -p < mangos/sql/create_mysql.sql
Enter password: 
ERROR 1045 (28000): Access denied for user 'kareta'@'localhost' (using password: YES)

I need to log in as root (however I AM NOT root) so I've been using

 mysql -uroot -ppassword < mangos/sql/create_mysql.sql

which returned me to a

 ~$

prompt.

But when I log in to mysql and do

show databases;

it gives me:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (0.00 sec)

Link to comment
Share on other sites

well I thought you already had access with user kareta

since you have not, do this:

mysql -u root -p < mangos/sql/create_mysql.sql

you'll need the root mysql password created at mysql installation. IF this wasn't done use this:

mysqladmin -u root -p password MYSUPERDUPASECRETPASSWORD 

Its rather save to do the import as root user (only danger would be importing a dangerous sql row), later on I'd use a different users e.g. 'mangos' as shown in different guides.

Yours

Skirnir

PS: My helpful day today :P

Link to comment
Share on other sites

sorry I was more tired than I thought. the correct form is ofc:

$ mysql -u username -p databasename < /path/to/sqlfile

in your case it must be:

$ mysql -u kareta -p mangos < /something/like/this.sql

this way you tell mysql to use the database called mangos. It's helpful with updates. You select your update file and type the mysql command and just run it to the correct database.

I woke up and knew what I did ...

Yours

Skirnir

Link to comment
Share on other sites

Guest
This topic is now 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