Jump to content
xisto Community
Sign in to follow this  
bhupinder

Installing Mysql? Im tring to install MySQL to my game made from MCcodes lite.

Recommended Posts

Well i have the codes for my game i got them from a friend of mine. He bought them from MCcodes.com and now i am tring to install MySQL to it.. but no luck with all other web host. I don't yet have a account for Xisto but "localhost" will not work no matter what host it is.. the last host that worked was from freehostia but it doesn't support cron jobs. mysql4.freehostia.com was the hostname but the rest of the web host i tried did not tell me the host name they just said to use "localhost" which doesn't work so does anyone know whats wrong? or what hostname i should use?

Share this post


Link to post
Share on other sites

Hmm...well, first of all, you can't install MySQL if this is not on a shared server --you don't have control over what they support on their servers. You can politely request that they support it, but they most likely will point you to a paid version of their web hosting. MySQL is available at Xisto (check out its front page for details), so once you've reached enough posts, you should be able to get the game code to work here.

 

However, if you are looking to edit the code and test it often, you should definitely look into this "localhost" you mentioned earlier. :-] This is otherwise known as installing a server on your own computer.

 

There are many different bundles that (quite easily) set up a server on your computer for you. If you're using Windows, I recommend something along the lines of WAMP (http://www.wampserver.com/en/) or XAMPP (https://www.apachefriends.org/index.html). Those are two of the more popular ones, but you can also check out the others at http://forums.xisto.com/no_longer_exists/.

 

You might consider XAMPP if you intend to run an smtp server (one that sends out emails. WAMP does not have this feature, so you'll have to custom install it. Very annoying and messy, from what I've seen.) Both WAMP and XAMPP set up two things closely related to a good development environment automatically: php and MySQL. (As a side note, WAMP is an acronym for Windows Apache MySQL PHP, so it all makes sense.)

 

Once you've installed WAMP or XAMPP (I have WAMP, so I can only tell you about that), you can probably check out one of the many tutorials on the internet for getting them to work. WAMP I'll explain right now:

 

Installing is easy; just follow the steps on the screen. When WAMP is running, there should be an icon on the system tray (it should be lit up, not gray). Click on that, and it'll open up another menu. Under this menu, there should be a headline "Services", under which the subtitles "Start all services" and "Stop all services" exist. Click "start all services" and Apache and MySQL will begin running. Then, simply enter "localhost" into your browser and you'll get the default WAMP page--WAMP5 logo on top, a list of tools such as phpMyAdmin, a list of your websites if you scroll down a bit more.

 

The rest is very easy. Access the folder where you've installed WAMP, and go to the folder www. Any folders you put instead here will represent a project of yours, all of which will appear under "Your projects" when you access localhost. So, create a folder with your game code and leave it there.

 

Then, if you go back to localhost in your browser, you should access one of the tools (most likely you'll end up using phpMyAdmin) and create/edit a database. Granted, perhaps this code your friend bought has php scripts that generate databases for you, allowing you to not need to create them manually, so find out if that is the case. Otherwise, there should be directions about what tables to create and what fields to add to each table.

 

Good luck! :-)

 

EDIT: Ooops, I just noticed that you mentioned cron jobs, which is only available on Linux. In that case, look into https://en.wikipedia.org/wiki/LAMP_(software_bundle). Check out this tutorial for more information on setting up a cron job: https://www.sitepoint.com/introducing-cron/. I remember using cron jobs on Xisto; I stopped because they were superfluous. So you can look forward to that once you host here too.

Edited by Arbitrary (see edit history)

Share this post


Link to post
Share on other sites

I have WAMP servers..but the installing i have to make on the game it asks thisMysql Hostname:Username:Password:Database name: so the only way to fill that form out is by registering a DBase and a User on a webhhost...but when i do that i cant find the correct Mysql hostname.

Share this post


Link to post
Share on other sites

I have WAMP servers..but the installing i have to make on the game it asks this
Mysql Hostname:
Username:
Password:
Database name:

Ah, just fill out the host name with "localhost". That's what it usually is as well on shared servers. The username should be "root", unless you created a new user account to access the database. There should be a warning in phpMyAdmin as soon as you login telling you to set your password, so if you set that, then that's your password. The database name is just the database you created.

so the only way to fill that form out is by registering a DBase and a User on a webhhost...but when i do that i cant find the correct Mysql hostname.

Usually, if the hostname is not localhost, they'll tell you what the MySQL hostname is. (I believe Xisto does...) Edited by Arbitrary (see edit history)

Share this post


Link to post
Share on other sites

Hmm...well, first of all, you can't install MySQL if this is not on a shared server --you don't have control over what they support on their servers. You can politely request that they support it, but they most likely will point you to a paid version of their web hosting. MySQL is available at Xisto (check out its front page for details), so once you've reached enough posts, you should be able to get the game code to work here.

 

However, if you are looking to edit the code and test it often, you should definitely look into this "localhost" you mentioned earlier. :-] This is otherwise known as installing a server on your own computer.

 

There are many different bundles that (quite easily) set up a server on your computer for you. If you're using Windows, I recommend something along the lines of WAMP (http://www.wampserver.com/en/) or XAMPP (https://www.apachefriends.org/index.html). Those are two of the more popular ones, but you can also check out the others at http://forums.xisto.com/no_longer_exists/.

 

You might consider XAMPP if you intend to run an smtp server (one that sends out emails. WAMP does not have this feature, so you'll have to custom install it. Very annoying and messy, from what I've seen.) Both WAMP and XAMPP set up two things closely related to a good development environment automatically: php and MySQL. (As a side note, WAMP is an acronym for Windows Apache MySQL PHP, so it all makes sense.)

 

Once you've installed WAMP or XAMPP (I have WAMP, so I can only tell you about that), you can probably check out one of the many tutorials on the internet for getting them to work. WAMP I'll explain right now:

 

Installing is easy; just follow the steps on the screen. When WAMP is running, there should be an icon on the system tray (it should be lit up, not gray). Click on that, and it'll open up another menu. Under this menu, there should be a headline "Services", under which the subtitles "Start all services" and "Stop all services" exist. Click "start all services" and Apache and MySQL will begin running. Then, simply enter "localhost" into your browser and you'll get the default WAMP page--WAMP5 logo on top, a list of tools such as phpMyAdmin, a list of your websites if you scroll down a bit more.

 

The rest is very easy. Access the folder where you've installed WAMP, and go to the folder www. Any folders you put instead here will represent a project of yours, all of which will appear under "Your projects" when you access localhost. So, create a folder with your game code and leave it there.

 

Then, if you go back to localhost in your browser, you should access one of the tools (most likely you'll end up using phpMyAdmin) and create/edit a database. Granted, perhaps this code your friend bought has php scripts that generate databases for you, allowing you to not need to create them manually, so find out if that is the case. Otherwise, there should be directions about what tables to create and what fields to add to each table.

 

Good luck! :-)

 

EDIT: Ooops, I just noticed that you mentioned cron jobs, which is only available on Linux. In that case, look into https://en.wikipedia.org/wiki/LAMP_(software_bundle). Check out this tutorial for more information on setting up a cron job: https://www.sitepoint.com/introducing-cron/. I remember using cron jobs on Xisto; I stopped because they were superfluous. So you can look forward to that once you host here too.

LoL i didnt get any of that.....i have a Xisto Cpanel now i made my Mysql DB but when i put in the info local host did not work you know what will??

Share this post


Link to post
Share on other sites

LoL i didnt get any of that.....i have a Xisto Cpanel now i made my Mysql DB but when i put in the info local host did not work you know what will??

You said you had WAMP. The information I gave in that was for WAMP, which is on your own computer, not on Xisto. If you follow my post, you should be able to set up the code on your own computer. Xisto is slightly different. If you're doing it on your own computer, then follow this:

Ah, just fill out the host name with "localhost". That's what it usually is as well on shared servers. The username should be "root", unless you created a new user account to access the database. There should be a warning in phpMyAdmin as soon as you login telling you to set your password, so if you set that, then that's your password. The database name is just the database you created.

If you're doing it on Xisto, then follow this:

The host name for Xisto is still "localhost", I believe. The username, on the other hand, is the name you used to create an account for the database. If you go into cpanel, you should click on MySQL Databases. Then scroll down to "Existing MySQL Users", and you should see a box that allows you to create a new user. Apparently your usernames will be prefixed with your login name. Copy what you entered as your username and password. Scroll up and you should see a list of MySQL databases--pick the one you want to use and copy and paste that.

EDIT:
In fact, if you look under each database, you should see a string that looks something like this (my quote is the PHP one):

$dbh=mysql_connect ("localhost", "fultor_wrdp1", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());mysql_select_db ("fultor_wrdp1");

Basically, the parameters of mysql_connect are mysql_connect($host_name, $username, $password), which means that you can figure out what the host, username and password are just by looking at it. :-)
Edited by Arbitrary (see edit history)

Share this post


Link to post
Share on other sites

Well, just to be sure that we know the basics here.You cannot access the MySQL server on Xisto from anywhere but Xisto. It isn't available to the outside world. Thus, "localhost". Which means that the MySQL server is at the same address (IP address) as the Apache Server (cPanel account).So you can't access the Xisto MySQL server from a script on your home's computer, etc...If the script and MySQL server are on the same machine (Your Free Xisto account), then you first need to create a database and then a username for that database under cPanel: MySQL DatabasesSee, since we offer unlimited MySQL databases with your account, we don't automatically create any for you. Many host allow only 1 database so the database is automatically created when the account is created and as a result, your cPanel username and password is probably used which is a bad idea.After you create the database, you create the user and be sure to write the password down that you use because you can't change it or find a lost one, you have to delete the user and create a new one.Then apply permissions to that user.You then have a MySQL database that is ready for use with scripts on the Xisto server.Hope This Helps,vujsa

Share this post


Link to post
Share on other sites

Im tring to connect my game with a mysql database....i used local host and i inserted all my dataDatabase nameUsernamepasswordbut i dont know what the hostname is.....can someone help me? and LOCALHOST WILL NOT WORK!

Share this post


Link to post
Share on other sites

Im tring to connect my game with a mysql database....i used local host and i inserted all my data
Database name
Username
password
but i dont know what the hostname is.....can someone help me? and LOCALHOST WILL NOT WORK!

I'm sorry to hear that you can't get your script to work but that isn't a reason to start a second topic about the same thing you already started a topic about and doesn't change the fact the the host name for the Xisto server is "localhost"! Now, considering what you said before about other hosts that you have had also not working leads me to believe that the problem isn't the servers but rather the user!

You ask a very cryptic question before referring to you local system and remote server as well as things you need that don't concern the problem such as CRON jobs etc and expect us to magically solve your problem.

Now, please try to explain what it is that you are trying to do and we will attempt to help you!
From what I've gathered, you want to run a script on your local system but use the Xisto MySQL server which as I explained before isn't possible. The Xisto MySQL server is not accessible from other IP addresses so if you try to use host: localhost from your local system, the script looks for a MySQL server on you local system which is what localhost means.
localhost = this machine

Now, if you have installed a script on the Xisto server and still cannot get it to connect to the MySQL server, then we can probably help you.

vujsa

Share this post


Link to post
Share on other sites

Ok...when ever i insert mysql data into the installer and press go heres what comes up..Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'bhupinder_gl'@'localhost' (using password: YES) in C:\wamp\www\Gang City\installer.php on line 66INSTALLATION ERROR: Access denied for user 'bhupinder_gl'@'localhost' (using password: YES)its MCcodes and they dont provide any support

Share this post


Link to post
Share on other sites

Ok...when ever i insert mysql data into the installer and press go heres what comes up..Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'bhupinder_gl'@'localhost' (using password: YES) in C:\wamp\www\Gang City\installer.php on line 66
INSTALLATION ERROR: Access denied for user 'bhupinder_gl'@'localhost' (using password: YES)

its MCcodes and they dont provide any support

What is the name of the database you created?
Did you actually create the user "bhupinder_gl"?
Did you give the user "bhupinder_gl" permissions on the database you created?

Why aren't you just doing this all on the Xisto server where I can give you step by step instructions for database setup?

vujsa

Share this post


Link to post
Share on other sites

what do you mean Xisto sever?

Well, you have a free web hosting account here at Xisto, why not use that instead of your local system?
And answer my other questions.

vujsa

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.