Halfagain IM Forums
May 24, 2012, 10:09 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Due to increasing spam we are forced to make this forum "Read Only". If you have an issue, most likely was discussed here. Use the Search function and try to find related discussions. If you can't find any helpful information, just email support at halfagain dot com"
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: MySQL Error:  (Read 1094 times)
0 Members and 1 Guest are viewing this topic.
zadokcash
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« on: August 20, 2009, 17:08 »

I seem to be having problems with my database files.  I've created a number of stores placed in subdomains hosted on HostGator.  Each store has its own database name and security code.  Things were running smoothly until last night when I went to access the admin to one of my stores that I received the following message:

Critical error: MySQL error: Access denied for user 'zadokcas_storest'@'localhost' (using password: YES)

I subsequently went back to the database file and checked it and then repaired it.  Once again I went to the admin of the store and received the same message.  Thinking that this might be a strange occurrence I tried another store and received the same message on each and every store's admin.  The only store that I could access was the last store that I was working on during the day.

Today I went to the databases and, beginning with the first store I couldn't access last night, exported its contents; created a new database file with a different name and security code; imported the contents from the previous file.  I then went through the install routine again using the new database file, which enabled me to enter new store with all my previous work intact.  I changed the layout preferences and store title; refreshed the screen and had my store back up and running.  I logged off of the admin and then went back to the previous store that I was able to open last night and was able to enter it.  BUT when I went back to the prior store, now with the new database, which had just been running, the same error message has come back.

I don't want to go through this whole process over again and end up no further along than when I began.  What do I do? 
Logged
labm
Newbie
*

Karma: 0
Offline Offline

Posts: 15


« Reply #1 on: August 20, 2009, 18:14 »

Have you called/emailed the host? Did they upgrade the database versions?

You should always be able to access a database if you are the user...the user is added to the database in the cpanel mysql options, not from phpmyadmin.

Databases and users are started with your account user name, so a db named database1 would be called user_database1, and the user name would be user_databaseusername...

Logged
zadokcash
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #2 on: August 20, 2009, 19:19 »

1.
Quote
Databases and users are started with your account user name, so a db named database1 would be called user_database1, and the user name would be user_databaseusername...

I have done this item correctly at the time of install.


2.
Quote
You should always be able to access a database if you are the user...the user is added to the database in the cpanel mysql options, not from phpmyadmin.

The cpanel mysql option was the method that I used to setup the original databases.  I only went to phpmyadmin only after I wasn't able to access the database.  This is the place where I only imported the records from the old database to the new database. 


3.
Quote
Have you called/emailed the host? Did they upgrade the database versions?

I have not done this yet but did find this notice from the knowledge desk regarding this matter:

Quote
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'someone'@'localhost' (using password: YES) in /home/cpusername/public_html/config.php on line 3
Couldn't connect to server.

This error tells you the exact situation. "Access denied" is your big clue! This means that the database user or password is incorrect in your php file. The database name must always be cpanelusername_databaseusername. You can check the correct spelling in cPanel, under MySQL Databases.


This seemed to answer the initial problem until I checked the database in cPanel and found that the user name was spelled correct.  Thinking that the password may have been wrong I verified what was stored in the database file and it only displayed the admin password which was spelled correctly.

Any further assistance will be appreciated.

Logged
labm
Newbie
*

Karma: 0
Offline Offline

Posts: 15


« Reply #3 on: August 20, 2009, 20:21 »

Hi there,

I am sorry that did not help. Hmmm...

It still sounds to me like a host issue, but lets' start at the beginning. I don't want to assume anything. We know this software and host play nice <grin> as many use this combo, so...

1. How long have you had this hosting account?
2. What PHP and MySQL version?
3. Which storestacker version?
4. Are your sub-domains and domain set up properly?
5. When you installed several and they worked for a while - how long is a while?

FYI - just in case it matters...you MUST build in place...moving StoreStacker from one location to another is difficult...install and set up in place, ok? No moving from one folder to another or one domain to another - no renaming the folder, etc..
 

Logged
zadokcash
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #4 on: August 20, 2009, 21:23 »

Your answers:

Quote
1. How long have you had this hosting account?
I began this account in Mid July of this year which leads to...
Quote
2. What PHP and MySQL version?
From all indications, the most recent version of these formats, which leads to ...

Quote
3. Which storestacker version?
Ran the upgrade last week on all items.  The first site (my test case site) I built  with the previous version; all the other sites constructed with the present version, which leads to...

Quote
4. Are your sub-domains and domain set up properly?
Each sub-domain was created through the cPanel function - not as a folder through the file manager which leads to...

Quote
5. When you installed several and they worked for a while - how long is a while?

My test-case site (see #3 above) has been from the beginning.  The other sites were created from Saturday to Wednesday.  The one site that I was, and am still able to access was the last one I created Wednesday.  The Test-Case site is the first one that I tried to access and ran into the problem and prompted this discourse.

Your move.
Logged
labm
Newbie
*

Karma: 0
Offline Offline

Posts: 15


« Reply #5 on: August 20, 2009, 21:36 »

<The one site that I was, and am still able to access was the last one I created Wednesday.>

Doesn't that sound like changes were made to your server host account? Perhaps an upgrade of some software in your hosting environment? Or re-imaging due to some other issue.The last site you installed and attached to a database works fine - retains the user info.

Did you chat/email/talk with anyone at your hosting company?
Logged
zadokcash
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #6 on: August 20, 2009, 23:00 »

Quote
Doesn't that sound like changes were made to your server host account? Perhaps an upgrade of some software in your hosting environment? Or re-imaging due to some other issue.The last site you installed and attached to a database works fine - retains the user info.

I thought that this was the issue also.  Yet this morning is when I built a new database for the test-case site and imported the records from the old database into the new.  When I ran the install for the new store it had all the old records, yet when I logged off and then went to verify the one site that did work from yesterday (which it still did and does), I could not return back to the new site without the error message.  Therein lies my dilemma.  What appear to be an upgrade of some sort isn't consistent with the performance on all stores.

I am still waiting for a return answer from the hosting company.

Logged
zadokcash
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #7 on: August 21, 2009, 01:40 »

I have heard from the support tech and he doesn't know the problem either and has booted me up to someone higher for a possible answer.  Maybe there is someone els that might know before they do.  Stay tuned as things unfold.
Logged
labm
Newbie
*

Karma: 0
Offline Offline

Posts: 15


« Reply #8 on: August 21, 2009, 03:05 »

I can imagine just how frustrated you are by now.  Technical issues that are intermittent or random are the worst.

If consistent - your security settings on your pc could block access. Yet, you can get on to at least one site.

You could try installing on another server just to ensure that there is nothing wrong with your MYSQL data that you are transferring. If you need a temporary test spot - let me know.

Still, my gut says that this is a hosting issue. You assign a password...the system fails to encrypt it so you cannot access it again. Or, there is a DNS issue. Again, they need to resolve this.

Meanwhile, you probably already saw these two posts in the forum about this issue..just in case, I will re-post the relevant parts.

Both from Omar

"Seems like you either made any typo when filled database details (username, db name, password) or you did not set ALL privileges to the username over the database in cpanel."

"Either your host name is not "localhost" but someting else (it happens for like 10% of hosts), you typed wrong myswl password or you did not added user to database with ALL privileges before run the install"

Logged
Omar
Here to help.
Administrator
Hero Member
*****

Karma: 10001
Offline Offline

Posts: 2687


« Reply #9 on: August 21, 2009, 14:05 »

The error is pretty clear, your server does not recognize your user as having privilegs to access the database. Either because no privileges are set, or because user/pass do not match.

In your SS install, inside /common/configs/ folder is a file named config.php. The content of that file is like this

<?
define("DB_SERVER","localhost");
define("DB_USER","zadokcas_dbuser");
define("DB_NAME","zadokcas_dbname");
define("DB_PASSWORD","dbpass");
define("ROOT","");
define("HOST","yourdomain.com");
?>

You should make sure that listed password and rest of db details are the same as exisit in your cpanel. You can also manually make another db user in cpanel, add it with all privileges to an existing SS database, and then manually modify this file to match database name, user and password.

If you are still getitng errors, is 99.9% chances your host database server to have issues. As with many hosts, they may deny that until you will prouve it yourself, or until they fix and then say was no problem..
Logged
zadokcash
Newbie
*

Karma: 0
Offline Offline

Posts: 6


« Reply #10 on: August 21, 2009, 17:20 »

Hello.

I heard from the tech support late last night and discovered the problem.  Proble has been resolved and all in back in order.  Apparently it has do with the old "fat-finger" problem when entering the password for the database.  I hit one of those "special" characters that programs claim to be their own and we mere mortals are not permitted to ever use them.  Lesson learned.  Thanks everyone for your support and advice.
Logged
labm
Newbie
*

Karma: 0
Offline Offline

Posts: 15


« Reply #11 on: August 21, 2009, 18:39 »

Glad you are back in business!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!