Welcome. In this thread you will learn how to setup a MySQL Database.
Please do not forget to add me a reputation point after you read this tutorial.
First Step:
First of all you have to download Xampp from Apache Friends - Xampp for Windows
After you download Xampp, run the installer. Set C:/xampp as the installation directory for efficiency. Before you complete the installation, you'll see a page having 3 tick boxes in the bottom. They should be looking like this:
After Xampp finishes its installation & the port check, go to http://localhost/xampp and click on Security.
Then click in http://localhost/security/xamppsecurity.php.
Set up a new password by filling out the two first boxes and clicking on password change.
The window should be like this:
Note: The first box in this picture won't be there for you if you just installed Xampp.
If you set your password, stop both of your services (Apache and MySQL) and then start them again. You can do that using Xampp Control Panel:
Click once the buttons writing "Stop" in the red square and then click them again.
Second Step:
Go to http://localhost/phpmyadmin and login with "root" as your username and use your newly created password like in this picture:
Now in PhpMyAdmin's main page, create a new database by typing the name of the database you want to create (theforgottenserver preferably) in the box marked in the following picture with the number 1 and then click "Create":
Now you created your database!
Third Step:
In your server's folder there is a .sql or a .mysql file which is needed for the database.
Now we will import this file into our server's database. In phpMyAdmin on the left side menu choose the database you created (click on its name) and then click in the small "Import" button above it like in these pictures:
and
Click "Browse" or "Search" (whatever the button with number 2 says) and then browse for the schema.mysql (in case you use the forgotten server) or database.sql or whichever file your server comes with and has .sql or .mysql extention, then click "Go".
If the import was successful then you'll see a message saying:
Import has been successfully finished, x queries executed.
- x might be different from user to user
If not then you're doing something wrong.
You now have some examples of players, accounts, groups, and some other things working on your database, try browsing the database to see how clear the information is.You will realise how easy MySQL is.
Fourth Step:
Go to config.lua and fill in your MySQL part
If you've done whatever I said carefully and properly, you will be able to run your server without MySQL problems. If still have problems add me on msn: [email protected]
Credits: Me and Talaturen
Please do not forget to add me a reputation point after you read this tutorial.
First Step:
First of all you have to download Xampp from Apache Friends - Xampp for Windows
After you download Xampp, run the installer. Set C:/xampp as the installation directory for efficiency. Before you complete the installation, you'll see a page having 3 tick boxes in the bottom. They should be looking like this:
After Xampp finishes its installation & the port check, go to http://localhost/xampp and click on Security.
Then click in http://localhost/security/xamppsecurity.php.
Set up a new password by filling out the two first boxes and clicking on password change.
The window should be like this:
Note: The first box in this picture won't be there for you if you just installed Xampp.
If you set your password, stop both of your services (Apache and MySQL) and then start them again. You can do that using Xampp Control Panel:
Click once the buttons writing "Stop" in the red square and then click them again.
Second Step:
Go to http://localhost/phpmyadmin and login with "root" as your username and use your newly created password like in this picture:
Now in PhpMyAdmin's main page, create a new database by typing the name of the database you want to create (theforgottenserver preferably) in the box marked in the following picture with the number 1 and then click "Create":
Now you created your database!
Third Step:
In your server's folder there is a .sql or a .mysql file which is needed for the database.
Now we will import this file into our server's database. In phpMyAdmin on the left side menu choose the database you created (click on its name) and then click in the small "Import" button above it like in these pictures:
and
Click "Browse" or "Search" (whatever the button with number 2 says) and then browse for the schema.mysql (in case you use the forgotten server) or database.sql or whichever file your server comes with and has .sql or .mysql extention, then click "Go".
If the import was successful then you'll see a message saying:
Import has been successfully finished, x queries executed.
- x might be different from user to user
If not then you're doing something wrong.
You now have some examples of players, accounts, groups, and some other things working on your database, try browsing the database to see how clear the information is.You will realise how easy MySQL is.
Fourth Step:
Go to config.lua and fill in your MySQL part
Code:
sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = "your mysql password here"
sqlDatabase = "the name of your database here"
If you've done whatever I said carefully and properly, you will be able to run your server without MySQL problems. If still have problems add me on msn: [email protected]
Credits: Me and Talaturen
Last edited: