• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MySQL How to setup MySQL (Answers for the normal errors too) Photos now!

Nikkster

Programmer
Joined
May 9, 2008
Messages
2,848
Reaction score
9
Location
Confidential
How to setup MySQL [03-03-2010] Photos now! Version: 2.0

Welcome to my tutorial. The thread has been growing a lot and it's time to re-write the tutorial with new updated information.

Status: The tutorial is full but I'm still working on adding new things to the tutorial to keep you updated. :)

Please everyone, make sure that you have forwarded the ports
7171, 7172,80,3306
To verify that your ports have been forwarded properly, please use this tool: Open Port Check Tool

Port explanation:
7171/7172: Tibia Application
80: Web Application
3306: Database Application (MySQL)

Are you ready?
Let's start off by going to this page to download the latest XAMPP.

If you use Windows, please go to this link and choose the .exe or the .zip download:
apache friends - xampp for windows

If you use Linux, please go to this link and choose the .exe or the .zip download:
apache friends - xampp for linux


Then you install it. If you downloaded the Zip files, extract them to the HTDOCS folder which is located inside the XAMPP folder.

Once that is done, you can setup your XAMPP.
Go to this website:
http://localhost/security/xamppsecurity.php
And then you should come to a page that looks like this:



Enter the password you want for your database and then verify it and press the "Passwort ändret" button.
Then you will need to restart the XAMPP, otherwise your new password is not going to work.

After restarting the XAMPP, you can now login to your PHPMyAdmin and create a database. Go to http://localhost/phpmyadmin/ and follow the steps listed on the following pictures:





Now you will need to import the database. You will find the MySQL file in your open-tibia folder. Go to your PHPMyAdmin, login to the PHPMyAdmin if you are not logged into it already and then click on the Import tab.


Then click on the browse 'button' to open the mysql.sql file.


And finally, choose the mysql.sql file. This is usually located in /schemas/ in the latest Open-Tibia distributions nowadays.


Now when you have imported your database, you will need to configure your config.php. Open config.php in your Open-Tibia Folder. Search for "Database" or "MySQL" until you can see this:


Change the password to the one you picked in the XAMPP setup and then database you created during the setup.

When that part is done, everything should work fine.



If you're using a forgotten server, there is already an account manager built-in to the server, so just make an account using 1/1, when you have made your character and everything, go to your database and click on the player table. You can see your name there, to make the character to a god, change the group id to 6.

Now the character is a char. If you're using the newest schema.sql file, you only need to set the group id to 6 in your character and it will have a god position.

One thing is important if your character will be updated in the database, change the SQL type in config, you need to change from SQLLITE to MySQL, I don't know how to explain better but try to find an option where you can choose a database type.
 
Last edited:
hi good tuto but i have a problem i heve windows vista and when the program installs apache an error aapear its about a port (80) i need help plx how can i solve this problem plx help
 
hi good tuto but i have a problem i heve windows vista and when the program installs apache an error aapear its about a port (80) i need help plx how can i solve this problem plx help

Try to install xampp directly in C:\ driver.

Then portforward port 80.
 
Ogreril just close all the programms which are working on 80 port, for example skype.
 
If you was more detailed about it, for example. Some people have routers and it doesn't let them open xampp_start.
 
Nice tutorial man, now i finally know how to host an SQL server.

EDIT:

My GM Character can't use any commands and it has the normal GM outfit, how can i fix these problems?
 
Last edited:
I can't understand from you good because u don't put photos Try To add photos next time :p
 
Bumping, thinking of posting photos too, what do you think? :)

EDIT: DONE :) Give me reputations ;)
 
Last edited:
that appears when i upload the database




Error

consulta SQL:

DELIMITER | CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON `accounts` FOR EACH ROW BEGIN DELETE FROM `bans` WHERE `type` !=1 AND `type` !=2 AND `value` = OLD.`id` ;

MySQL ha dicho: Documentación
#1064 - 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 'DELIMITER |

CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
' at line 1
 
that appears when i upload the database




Error

consulta SQL:

DELIMITER | CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON `accounts` FOR EACH ROW BEGIN DELETE FROM `bans` WHERE `type` !=1 AND `type` !=2 AND `value` = OLD.`id` ;

MySQL ha dicho: Documentación
#1064 - 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 'DELIMITER |

CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
' at line 1

It's sorta normal, try change everything and you'll see there's no problem at all.
 
how do i make my first GM/GOD :S and whats main city spot like in rook its 1000/1000/7 whats main cordinates? thanks :D from tfs
 
for some reason when i try to click on the links i cant load them


What kind of browser do you use?
Check if there's any problems with the one you're using.
I recommend firefox!



@ Rambo
I have explained everything about how you create a GM account. Press ctrl + F and search for "GM" and you'll find it. Dude, check before ask, my advice. :p
About the coordinates, download the latest mapeditor, try search for the coordinates in the map editor. I have no idea what map you're using, so I have no answer either.
 
Last edited:
Nice tut but i got 1 prob. :(
[20/10/2008 18:14:06] > MySQL ERROR mysql_real_connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
[20/10/2008 18:14:06] > ERROR: Failed to connect to database, read doc/MYSQL_HELP for information or try SqLite which doesn't require any connection.
i get that :/
 
Thanks Man This helped a lot! I will tell my friends about this tutorial, for sure!
 
Back
Top