|
|
Installing Mysql? - Im tring to install MySQL to my game made from MCcodes lite. | ||
Discussion by bhupinder with 17 Replies.
Last Update: January 27, 2008, 6:23 pm (View Latest) | Page 1 of 2 pages. | ||
Mon Jan 7, 2008 New Discussion
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.
Sat Jan 12, 2008 New Discussion
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.
Sat Jan 12, 2008 New Discussion
i also have mysqllitemanger
Sat Jan 12, 2008 New Discussion
QUOTE
I have WAMP servers..but the installing i have to make on the game it asks thisMysql 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...)
Sat Jan 12, 2008 New Discussion
QUOTE (Arbitrary)
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.
Link: view Post: 116608
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??
Sun Jan 13, 2008 New Discussion
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. :-)
Sun Jan 13, 2008 New Discussion
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
Sun Jan 13, 2008 New Discussion
Mon Jan 14, 2008 New Discussion
Database name
Username
password
but i dont know what the hostname is.....can someone help me? and LOCALHOST WILL NOT WORK!
Tue Jan 15, 2008 New Discussion
QUOTE (bhupinder)
Im tring to connect my game with a mysql database....i used local host and i inserted all my dataDatabase name
Username
password
but i dont know what the hostname is.....can someone help me? and LOCALHOST WILL NOT WORK!
Link: view Post: 116955
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 AstaHost 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 AstaHost MySQL server which as I explained before isn't possible. The AstaHost 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 AstaHost server and still cannot get it to connect to the MySQL server, then we can probably help you.
vujsa
Wed Jan 16, 2008 New Discussion
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
Wed Jan 16, 2008 New Discussion
QUOTE (bhupinder)
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
Link: view Post: 116958
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 AstaHost server where I can give you step by step instructions for database setup?
vujsa
Wed Jan 16, 2008 New Discussion
Wed Jan 16, 2008 New Discussion
Well, you have a free web hosting account here at AstaHost, why not use that instead of your local system?
And answer my other questions.
vujsa
Wed Jan 16, 2008 New Discussion
World Of Warcraft Server (2)
|
(7) I Thought It Was _my_ Sql, Now Sun Owns It
|
Index




