Posts: 528
Threads: 70
Joined: Nov 2014
Reputation:
0
Is it possible to add the database created from normal MYSQL program ? I mean the program from the windows.. i create the database there , is there any possible way to add it to pawno? if it is can i know the procedure?
Thank you.
Posts: 749
Threads: 76
Joined: Apr 2013
Reputation:
0
Do you mean importing the database you created in in your PC and into your server's database?
Like in your host etc..?
If yes, then you can do it.
Posts: 528
Threads: 70
Joined: Nov 2014
Reputation:
0
yes.. i have created 1 database in my PC , how can i add it to pawno?
Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
Export database ( compressed ) and import it into your host database
Posts: 749
Threads: 76
Joined: Apr 2013
Reputation:
0
Oh wait, do you mean in your script or host database?
If host, just export the database from the program and import it in your host's database
Posts: 749
Threads: 76
Joined: Apr 2013
Reputation:
0
Are you hosting your server from your PC or you bought a host/vps to host your server?
Posts: 528
Threads: 70
Joined: Nov 2014
Reputation:
0
I haven't started the server. Eventually tring to make 1.. so , for testing i wanted to ask you that if i created any database from that, how can i add to pawno? like if i use XAMPP we do it directly.. By defining the host database blah blah and then this
mysql_format(mysql, query, sizeof(query),"SELECT `Password`, `ID` FROM `playerinfo` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);
So how can i add that programs database to this?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Pff, how am I going to explain this? You can't "add a database to Pawno". Pawno is an editor. You can't add a database to Pawn either.
The MySQL server is, evidently, a server. It doesn't matter whether it is downloaded stand-alone from mysql.com or included in a package like XAMPP or WAMP. It the exact same thing and once it has been set up you should be able to connect to it using any client.
A client is anything that connects to the MySQL server. There are many clients: phpMyAdmin is a client, MySQL Workbench is a client, the command line can be a client and the MySQL plugin for SA-MP is also a client.
However in order to connect you must have a username and a password. When the server is set up, typically only a root account is created. Now, it is a very bad idea to run anything as the root user so a new user is created with a password. Clients that have a user interface (MySQL WorkBench, phpMyAdmin, ...) usually have a fairly straightforward way to accomplish this. Next, a database is created and the user that was just created is given permission to use that database.
The user, the password and the database you just created are the things that need to be added to your script in order to connect.