|
|
|
|
![]() ![]() |
Jan 7 2008, 08:34 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 5-January 08 Member No.: 27,390 |
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 Astahost 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?
|
|
|
|
Jan 12 2008, 03:14 AM
Post
#2
|
|
|
Premium Member Group: [HOSTED] Posts: 377 Joined: 17-June 06 From: Adblock life Member No.: 13,992 |
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 Astahost (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 (http://www.apachefriends.org/en/xampp.html). Those are two of the more popular ones, but you can also check out the others at http://en.wikipedia.org/wiki/Comparison_of_WAMPs. 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 http://en.wikipedia.org/wiki/LAMP_(software_bundle). Check out this tutorial for more information on setting up a cron job: http://www.sitepoint.com/article/introducing-cron. I remember using cron jobs on Astahost; I stopped because they were superfluous. So you can look forward to that once you host here too. This post has been edited by Arbitrary: Jan 12 2008, 03:31 AM |
|
|
|
Jan 12 2008, 06:02 PM
Post
#3
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 5-January 08 Member No.: 27,390 |
I have WAMP servers..but the installing i have to make on the game it asks this
Mysql 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. |
|
|
|
Jan 12 2008, 06:08 PM
Post
#4
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 5-January 08 Member No.: 27,390 |
It has PhPmyadmin and i made a database but how do i make a user for my database???
i also have mysqllitemanger |
|
|
|
Jan 12 2008, 09:39 PM
Post
#5
|
|
|
Premium Member Group: [HOSTED] Posts: 377 Joined: 17-June 06 From: Adblock life Member No.: 13,992 |
QUOTE I have WAMP servers..but the installing i have to make on the game it asks 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.Mysql Hostname: Username: Password: Database name: QUOTE 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 Astahost does...) This post has been edited by Arbitrary: Jan 12 2008, 09:40 PM |
|
|
|
Jan 13 2008, 08:05 PM
Post
#6
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 5-January 08 Member No.: 27,390 |
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 Astahost (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 (http://www.apachefriends.org/en/xampp.html). Those are two of the more popular ones, but you can also check out the others at http://en.wikipedia.org/wiki/Comparison_of_WAMPs. 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 http://en.wikipedia.org/wiki/LAMP_(software_bundle). Check out this tutorial for more information on setting up a cron job: http://www.sitepoint.com/article/introducing-cron. I remember using cron jobs on Astahost; 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 Astahost Cpanel now i made my Mysql DB but when i put in the info local host did not work you know what will?? |
|
|
|
Jan 13 2008, 09:33 PM
Post
#7
|
|
|
Premium Member Group: [HOSTED] Posts: 377 Joined: 17-June 06 From: Adblock life Member No.: 13,992 |
QUOTE LoL i didnt get any of that.....i have a Astahost Cpanel now i made my Mysql DB but when i put in the info local host did not work you know what will?? QUOTE 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 Astahost, then follow this: The host name for Astahost 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): QUOTE $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. :-) This post has been edited by Arbitrary: Jan 13 2008, 09:39 PM |
|
|
|
Jan 13 2008, 11:33 PM
Post
#8
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 |
Well, just to be sure that we know the basics here.
You cannot access the MySQL server on AstaHost from anywhere but AstaHost. 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 AstaHost MySQL server from a script on your home's computer, etc... If the script and MySQL server are on the same machine (Your Free AstaHost account), then you first need to create a database and then a username for that database under cPanel: MySQL Databases See, 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 AstaHost server. Hope This Helps, vujsa |
|
|
|
Jan 14 2008, 12:48 AM
Post
#9
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 5-January 08 Member No.: 27,390 |
Well i did all that made a user added pass have mysql database....but when ever i put in the info it says error connecting to username@localhost so i dont know whats up with it
|
|
|
|
Jan 15 2008, 11:50 PM
Post
#10
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 5-January 08 Member No.: 27,390 |
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! |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 05:42 AM |