Hello, I am new to the mysql database thing, and am having some trouble. Ok, heres the deal. its probibly really simple, but im clueless. I am currently installing a files for which require a database. the database name is "onlinegames" inside all of the files. when i go into my cpanel and create a database, it creates it and it shows up as "dollar_onlinegames" and my username and password both show "dollar_USER" and "dollar_PASS" when i add the user to the database. Im curious, would the "dollar_" part that my cpanel is for some reason adding be the reason it is not working correctly? when I go into the mysql part of the cpanel, and then click the "phpMyAdmin" link to edit the databases, i get into this area it says "MySQL 4.0.25-standard running on localhost as dollar@localhost" at the top" and when I add the tables to the database, they work. Now, when i go in the admin area of the gamescript to add a catagory and a game, this is the message that pops up: "Warning: mysql_insert_id(): A link to the server could not be established in /home/dollar/public_html/arcadeallstars/text/admincp/admin.class.php on line 163" I'm just wondering if this is because all the files record the database as "onlinegames" and in mysql spot on my cpanel it says "dollar_onlinegames" or is the dollar_ part of the database name, username, and password all insignificent? Sorry if this is crazy sounding, im just clueless to this all. If its too hard to understand, I can give someone access to my cpanel to look it over if that is possible. I appreciate any help I can get. Thanks everyone. - Robb
It adds the dollar_ part to the beginning (usually your username) just to make the database unique amongst the shared webserver. It prevents any possibility what so ever of creating a duplicate database The only thing that shouldn't be how it is, is the password. While the username usually is dollar_username, the password should be unique to you. So, your question answered, is yes, in the mysql_connect, you need to use "dollar_username" for the username, and "dollar_onlinegames" for the database name. The password should be the unique one you created. However, try it both ways and see if it works for you!
thank you so much drewbe121212, this fixed it all for me. sorry about the PM, I just was freaking out. lol. now I know, and hopefully I can learn more and one day give back to others as you have to me. Thanks again. - Robb
No problem Robb! lol The PM actually scared me when it happened. I was browsing around the forum, and was pretty zoned into the screen and *POP* the alert message notifying me of a new private message came up. Needless to say it took a few moments to figure out what was going on, but I got it figured out :grin: As always, if you ever have any questions, please dont hesitate to ask! I am always excited to share the insight I may have to a situation!