Database is gone

Status
Not open for further replies.

grvsx10h

Member
Messages
34
Reaction score
0
Points
6
I went to my site and received
Connect failed: Access denied for user ''@'localhost'

Where are the instructions to reattach the database?
 

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
If I'm not mistaken your server is currently recieving accounts, might be best to wait a bit and see if it comes back by itself.

Though the full error seem to indicate no password is sent with the connection details, you might want to look into that part still though
 

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
You would then need to give the database a user and a password. With cPanel it was possible to access the database with the cpaneluser/password combination, might have changed with directadmin.

Go to Account Manager->MySQL management. Click on the database name and you will be presented with a bit information as well as have a button that says "create new user".

Once you have it created, you need to update the config file for the script to use the new user and its password for database connections.
 

grvsx10h

Member
Messages
34
Reaction score
0
Points
6
I added a user that was mysteriously removed.
I have always connected to the database with a username,password,hostname as specified in the VARS.PHP file.
The database name also mysteriously changed, which is now reflected in the VARS.PHP file.

I still get the error
Connect failed: Access denied for user ''@'localhost' (using password: NO)

I guess I need specific instructions on how to fix the problem.
Why my other site (pattinson.x10host.com) works fine after migration and this one (grvs.x10host.com) is being a problem child would also be a good thing to know.
 

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
The error message still indicates that no user is passed with the connection and not using password (probably due to lack of username)

Which database should be contected with that specific site, and in what folder would I find vars.php (I'd like to take a closer look)?
 

grvsx10h

Member
Messages
34
Reaction score
0
Points
6
VARS.PHP is in ROOT
Only 1 database - grvsx10h_grvs
I cannot delete the user grvsx10h_grvsx10 -- it's a mistake

in public_html/maintain.php is a connection to the database on line 309
 

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
I have found the issue, the relative path between the connecting file and the vars.php is wrong since cpanel and directadmin handles things differently. One option would be to move vars.php to the folder called grvs.x10host.com which would make the current relative path correct (that is one step outside of public_html).

I did copy the vars.php into above suggested location and I got it to work for you. The file is still inaccessible by outside viewers so should be perfectly safe to have in that place. I tried using absolut path to call it from the root but it would appear that isn't an option that works, perhaps the webpart of the sevrver can't access above the domains folder.

As for removing the extra user, that can be done by clicking the checkmark next to it and then use the delete option that appears (if that still fails I should be able to do it for you)
 

grvsx10h

Member
Messages
34
Reaction score
0
Points
6
Thank you! So was ROOT and PUBLIC_HTML the same? They did not appear to be the same directory.

The user will not delete for me. The confirmation stays on the screen and the user never goes away.
 

grvsx10h

Member
Messages
34
Reaction score
0
Points
6
Oh, wait, root must have bee ABOVE the domain directory. How'd the file get there?
Oh well.
 

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
Oh, wait, root must have bee ABOVE the domain directory. How'd the file get there?
Oh well.
Yes, root on cpanel was just one step above from public_html, and with it being in root there directadmin naturally assumed you still wanted it in root along with the files that indeed do belong there.

The added extra user has been removed from the database.
 
Status
Not open for further replies.
Top