Closed Thread
Results 1 to 4 of 4

Thread: SQL connection problems.

  1. #1
    tehmedia is offline x10Hosting Member tehmedia is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    2

    SQL connection problems.

    Now, I wouldn't be posting here begging for help if I hadn't got to the ends of my wit. Anyhow I am having trouble. I'm uploading a text based mmorpg to test in beta before I purchase a domain and hosting.

    Write Config...
    Config written.
    Attempting DB connection

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'game'@'cossacks.x10hosting.com' (using password: YES) in /home/tehmedia/public_html/class/class_db_mysql.php on line 46
    FATAL ERROR: Could not connect to database on localhost (Access denied for user 'game'@'cossacks.x10hosting.com' (using password: YES))

    It's really depressing, I can't even get this right - I don't know what I'd do on the cronjobs.

    Line 46;
    Code:
          $this->connection_id=mysql_connect($this->host, $this->user, $this->pass, 1) or $this->connection_error();
    Any help? I've set a username and password but I canny' get it to work captain. ;)

  2. #2
    TechAsh's Avatar
    TechAsh is offline Retired TechAsh is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    5,853

    Re: SQL connection problems.

    Hi,

    The Username should be your cPanel username followed by an underscore and the name of the MySQL user you set up in cPanel

    For Example: cpanel_dbuser

    The Password should be whatever you set when you created the MySQL user in cPanel

    The Host should be 'localhost'

    You should check that you have created the database and database user in cPanel and that you have these details correct in your script.
    Useful Links:
    Terms of Service | Server News | Buy a Domain
    Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime


    My Websites:
    Earthtime Games & TechAsh's Blog

  3. #3
    tehmedia is offline x10Hosting Member tehmedia is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    2

    Re: SQL connection problems.

    Thanks for your quick reply, I've tried that and I'm still experiencing the same problems.

    Would you be able to do this for me? It's a simple to use page but I cannot seem to figure it out.
    Last edited by tehmedia; 02-21-2010 at 06:28 AM.

  4. #4
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,254

    Re: SQL connection problems.

    Few days before i was facing the same problem,but when i added the 'localhost' as dbserver it started working,and also my ip was pointing to old ip,i also corrected it.
    What is your link that is giving the error
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

Closed Thread

Similar Threads

  1. asp.net and mysql connection problems
    By diesel543 in forum Programming Help
    Replies: 6
    Last Post: 08-16-2009, 09:04 AM
  2. SQL services still have problems
    By nandifamily in forum Free Hosting
    Replies: 1
    Last Post: 10-04-2008, 10:45 AM
  3. SQL newbie here. How do i create a connection from php?
    By timur in forum Programming Help
    Replies: 8
    Last Post: 04-10-2008, 03:09 PM
  4. connection problems
    By bigguy in forum Scripts & 3rd Party Apps
    Replies: 15
    Last Post: 05-04-2005, 07:12 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers