Advertisement:

Author Topic: Cannot connect to the database. Error number: 2002  (Read 4212 times)

vaithee

  • Newbie
  • *
  • Posts: 17
Cannot connect to the database. Error number: 2002
« on: February 11, 2013, 06:20:39 pm »
I am using godaddy hosting server. i successfull completed first 2 steps of installation.

I dont know the exact database information.

Host : localhost

database name osclass

username - dont know

password - dont know

table prefix oc_

while i tried with some username, password it shows the error "Cannot connect to the database. Error number: 2002". anyone of u pls help me.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Cannot connect to the database. Error number: 2002
« Reply #1 on: February 12, 2013, 11:22:58 am »
username and password are REQUIRED to connect to the database, ask your hosting provider for them

Rubens

  • Newbie
  • *
  • Posts: 1
Re: Cannot connect to the database. Error number: 2002
« Reply #2 on: February 13, 2013, 06:30:59 pm »
Ok, let's see if I can help. First you have to create a database. Log into your Godaddy hosting. Go into Cpanel, in the database, access the MySQL database icon. You will now create a database has a field to put the name of the database, you can put the name of OSCLASS. Put down the name of the user who will access the database and password. These are data that you will enter in the register of OSCLASS. In the registration is already the name of the database as "osclass", but you will put the name that you created, and the user name and password. So just give ok and you will move on to another stage. I hope I helped.

vaithee

  • Newbie
  • *
  • Posts: 17
Re: Cannot connect to the database. Error number: 2002
« Reply #3 on: May 07, 2013, 07:31:34 am »
Hi Ruben,
Your information is really great.But the main problem behind the error is database password.In Godaddy, we should not use any special characters like $,! type of special characters in database access password.It only makes this type of database connection error.After a long time i found this error and rectify it and now i am using osclass successfully.

Aficionado

  • Guest
Re: Cannot connect to the database. Error number: 2002
« Reply #4 on: May 07, 2013, 06:41:38 pm »
Hi Ruben,
Your information is really great.But the main problem behind the error is database password.In Godaddy, we should not use any special characters like $,! type of special characters in database access password.It only makes this type of database connection error.After a long time i found this error and rectify it and now i am using osclass successfully.

A friendly advise, move away from Godaddy.


vaithee

  • Newbie
  • *
  • Posts: 17
Re: Cannot connect to the database. Error number: 2002
« Reply #5 on: May 08, 2013, 06:59:34 am »
Yes Aficionado, I have already planned to move some other company like hostgator. :P

egemen_i

  • Newbie
  • *
  • Posts: 39
Re: Cannot connect to the database. Error number: 2002
« Reply #6 on: May 08, 2013, 12:21:09 pm »
Actually godaddy is one of the hosting best provider. And how it's godaddy's fault if you haven't created one lol. You say you don't know your pass and username, you have to create a database first.

Go to My Account - Web Hosting - Launch - Databases - Click Add

Fill the form and now u will have

Database name and username: *    and password.


Go to My Account - Web Hosting - Launch - Databases - Details (of recently created database)

At the bottom there will be something like
Hostname:
example.db.1123123.hostedresource.com

replace localhost with this link

Aficionado

  • Guest
Re: Cannot connect to the database. Error number: 2002
« Reply #7 on: May 08, 2013, 03:52:27 pm »
Yes Aficionado, I have already planned to move some other company like hostgator. :P

Keep in mind that shared Host Gator plans are ok for low to medium traffic websites. While they claim unlimited everything (disk / traffic), a lot of restrictions exist. For example a 25-30 processes limit, and if you reach that limit your website seems down (you can't access the DB).

For example i have found that BULK deleting ads or if you delete a user (=deleting also all his ads) causes some problems.

So, for 4.000-5.000 daily hits HG is perfect. Maybe more, if your traffic is "devided" in the whole 24 hours and has no "peaks".

Aficionado

  • Guest
Re: Cannot connect to the database. Error number: 2002
« Reply #8 on: May 08, 2013, 03:54:55 pm »
Actually godaddy is one of the hosting best provider.

Actually Godaddy is one of the WORST hosting providers for both Windows and Linux hosting. A google search will reveal the problems.


egemen_i

  • Newbie
  • *
  • Posts: 39
Re: Cannot connect to the database. Error number: 2002
« Reply #9 on: May 09, 2013, 12:55:34 am »
Actually godaddy is one of the hosting best provider.

Actually Godaddy is one of the WORST hosting providers for both Windows and Linux hosting. A google search will reveal the problems.

Are you serious? What hosting should i prefer for really high traffic. I'm expecting thousands of new listings and couple hunred thousand viewing everyday. Also do you think osclass can handle such traffic?