Cannot connect to my website or DA Panel with domain name

ajax20

Verified User
Joined
Jul 16, 2014
Messages
142
Hello

I own a VPS configured by Directadmin. I have only one IP address and a domain name for it.
Just a couple of hours ago, I was trying to solve the problem of not being able to enter mysql as root. I got the following error:

Code:
[B]ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)[/B]

which I received after I issued:
Code:
[B]mysql -u root -p[/B]

To access mysql I did as I was instructed in http://forum.directadmin.com/showthread.php?t=24417.

However, after issuing the command

Code:
mysql --user=`grep "^user=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --password=`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`

I could no longer access my website or directadmin panel through the domain name, though I can get to the DA panel by the IP.

I am not sure if that was the cause of the problem but now I do not know how to go about troubleshooting my broken website.

Please help me with this problem.

Thanks in advance.

PS:

It may help to say that I originally needed to access mysql as root because I wanted to convert Converting InnoDB tables to Barracuda for my Moodle installation. The details are described here: https://moodle.org/mod/forum/discuss.php?d=312863
 
Last edited:
I tried the following:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build all d

but it stops with with the following error:

Code:
>>> Creating links to source files...
>>> Creating lookups/Makefile for building dynamic modules
>>> New Makefile & lookups/Makefile installed
>>> Use "make makefile" if you need to force rebuilding of the makefile
 
make[1]: Entering directory `/usr/local/directadmin/custombuild/exim-4.86/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
gcc buildconfig.c
/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/usr/local/directadmin/custombuild/exim-4.86/build-Linux-x86_64'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.86/build-Linux-x86_64'
Building configuration file config.h

*** BIN_DIRECTORY has not been defined in any of the Makefiles in the
    "Local" directory. Please review your build-time configuration.

make[1]: *** [config.h] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.86/build-Linux-x86_64'
make: *** [all] Error 2

Any ideas?
 
1) DA uses the user and passwd values from:
Code:
/usr/local/directadmin/conf/mysql.conf
to login to MySQL.
Because it's showing "root" and not "da_admin", either the file is empty or set incorrectly.

This command is used simply to login to mysql with the user/pass set in that file, but doesn't do anything:
Code:
[COLOR=#333333]mysql --user=`grep "^user=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --password=`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
[/COLOR]

Check the file
Code:
/usr/local/directadmin/scripts/setup.txt
as there should be an "adminpass" value.
Try that password with the da_admin user for MySQL. If that works, set it in the mysql.conf.


2) If you can connect to DA through the IP, but not the domain, then it means there is a dns issue.
Check intodns.com to see if the domain resolves.

This might be related:
http://help.directadmin.com/item.php?id=387

John
 
Hello John

I will try your suggestions and will post the result here. Thanks a lot.

By the way, the exim error was due to the slow connection to files.directadmin.com which was solved after I changed it to faster mirrored files server by following the guide here:

http://help.directadmin.com/item.php?id=305
 
@John
As you mentioned, the problem was the wrong password.

I issued

Code:
mysql -u da_admin -p

with the password I got from

Code:
/usr/local/directadmin/scripts/setup.txt

and then I could enter the mysql. Thanks a lot for that.

But still the dns issue persists. Checking the domain name in intodns shows no problems.

I just have no clues as to what the culprit can be.
 
If it's a windows box, check to see which IP the domain resolves to. Load up the cmd prompt, and try:
Code:
ping domain.com
to make sure it resolves to an IP that is on the DA box.
 
It is a Mac.

When I type

Code:
ping mydomain.com

I get

Code:
ping: cannot resolve mydomain.com: Unknown host
 
It is a shame! The problem was due to my internet connection. I called the ISP and they sorted out the problem. Thank you John for your help.
 
Back
Top