Failed to create virtual server : DBI connect failed : Access denied for user: 'root@localhost' (Using password: YES)

18 posts / 0 new
Last post
#1 Tue, 09/06/2005 - 16:44
GregMcAbee

Failed to create virtual server : DBI connect failed : Access denied for user: 'root@localhost' (Using password: YES)

Ichanged my root password earlier at the request of my ISP so they could have access. Now when I try and add a virtual Server I get the above message.

Failed to create virtual server : DBI connect failed : Access denied for user: 'root@localhost' (Using password: YES)

I do not know what the password was when I changed it. Anyone know how I might fix this?

Kind Regards, Greg McAbee

Sun, 06/07/2009 - 06:58
Joe
Joe's picture

Hi Greg,

There is a section in the MySQL documentation about this problem:

http://dev.mysql.com/doc/mysql/en/access-denied.html

And specifically, you'll probably need to reset your root password:

http://dev.mysql.com/doc/mysql/en/resetting-permissions.html

--

Check out the forum guidelines!

Sun, 06/07/2009 - 06:58
GregMcAbee

Hi Joe,

I have many, many serious issues at this point and I am not sure what do. Not sure if you have ever seen a scenario like this before. I am also not sure that Virtualmin is to blame, in fact I don't think so.

After I changed my root password yesterday it sat in that state for some time. I then tried to add a Server and got the error in the title.

After that I quickly realized my entire server was down. I called dedicated support and they helped me resynch my mysql password. But something has been fundamentally wrong ever since.

We tried to restore the webmin config and that blew up forcing us to power down the server. At that point the Server was rebooted and a webmin login would only open a usermin coonfig stating that I had no access to usermin.

I went to the webmin page and found out how to deinstall and reinstall wembmin and that fixed webmin.

However, I am in an odd state because Virtualmin is now blank where my virtual servers were. I cannot restore my virtualmin backup from yesterday because it keeps saying parts still exists. IE users and databases which I have already deleted.

So I have a Wembin backup and a VirtualMin backup from yesterday. Neither one seems to help me out very much.

I know you don't have the kind of time it takes to help with something like this. I was just curious what you would do next if you were me?

Thanks,
Greg McAbee

Sun, 06/07/2009 - 06:58
GregMcAbee

I get a lot of these as well.

[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[FAILED]]

Sun, 06/07/2009 - 06:58
GregMcAbee

I get a lot of these as well.

[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[Wed Sep 07 08:15:17 2005]] [[warn]] VirtualHost 192.168.0.2:80 overlaps with VirtualHost 192.168.0.2:80, the first has precedence, perhaps you need a NameVirtualHost directive
[[FAILED]]

Sun, 06/07/2009 - 06:58
Joe
Joe's picture

The first step is Don't Panic!

I see it a lot (and I do it myself sometimes). When a problem isn't understood it begins to take on much larger significance than it deserves. Stop doing the install/uninstall/reinstall and restore from backup cycle until we know what's actually happening. It's not going to solve whatever the root issue is, and it will serve to disguise it with other problems (leading to the panicked state you find yourself in now, where you see monsters around every corner!). ;-) The MySQL problem really was a simple thing. You definitely shouldn't go uninstalling software, restoring from backups and other assorted extreme measures over a forgotten MySQL root password!

The new Apache error you've posted is also mostly harmless (so don't go reinstalling Apache!). It even tells you what you need to do: Add a NameVirtualHost directive.

Browse to the Apache module. Click on Networking and Addresses. In the field labelled[b>Addresses for name virtual servers</b> fill in an address and port, or just click the "Include all addresses" option. Save it. Restart Apache.

See if Apache is now happier. The error you've reported will go away for sure...but there might be other issues.

Once that's done, we can begin to address your other issues.

Remember: Don't Panic! It's not so bad.

--

Check out the forum guidelines!

Sun, 06/07/2009 - 06:58
DannyWeaver

When I first started using linux, for both the desktop and server side of things, I would panic at everything. The thing to remember with linux is that everything can be fixed without resintalling. It is in fact easier that way. You find the appropriate docs, this is where google comes in, and you browse through the table of contents to find what you need. You'll learn alot more this way, as well as save yourself a few years on the end of your life. :-D

Sun, 06/07/2009 - 06:58
GregMcAbee

Thanks for the calm and cool response. Okay let's try to see the root issue. The root issue I can see at this point has to do with apache {best guess) and maybe DNS a little.

The default web server that is supposed to show up whenever other domains do not resolve is not working as designed. Instead it fails over to the first virtual server in line which in my case is a Server called indyafterhours.com

One of my name servers isn't responding like it should normally. Probably something to do with the new firewall not accepting port 53 UPD. Dedicated Support is working on this one.

I think if I can shake the default server issue it will be clearer sailing, I cannot get to the Server at the moment as the Unix experts at aplus.net are trying to correct the issue. Thanks for your great responses and general caring.

Sun, 06/07/2009 - 06:58
GregMcAbee

Thanks for the calm and cool response. Okay let's try to see the root issue. The root issue I can see at this point has to do with apache {best guess) and maybe DNS a little.

The default web server that is supposed to show up whenever other domains do not resolve is not working as designed. Instead it fails over to the first virtual server in line which in my case is a Server called indyafterhours.com

One of my name servers isn't responding like it should normally. Probably something to do with the new firewall not accepting port 53 UPD. Dedicated Support is working on this one.

I think if I can shake the default server issue it will be clearer sailing, I cannot get to the Server at the moment as the Unix experts at aplus.net are trying to correct the issue. Thanks for your great responses and general caring.

Thu, 09/08/2005 - 03:39
Joe
Joe's picture

Hi Greg,

Ok, you can test the DNS trouble, like so:

On the box itself, use the host command to find out if your names are resolving correctly:

% host mydomain.com localhost

This will bypass any firewall. Next step, is to see if the name server is listening on public addresses:

% netstat -l | grep domain

This will list all of the IP addresses on which your name server is listening. Make sure one of them is the one that your registrar thinks is the address to query:

% whois mydomain.com

Look for the domain name server section. You'll need to make sure both of those addresses works, for queries (you can use host again, specifying each of the nameservers in place of "localhost").

To check the firewall, you can import it into the Webmin Linux Firewall module, or you can just run "iptables -L -v", and look for rules that apply to "domain". To test without the firewall, just turn it off...

# service iptables stop

And turn it back on with "start" when you're done testing.

The Apache default domain question is even simpler, and it is actually working exactly as designed. Now that you've switched to name-based hosts (which you have to do to run more than one domain on a single IP), your default domain is simply the first one listed. Just cut and paste the NameVirtualHost section for your preferred virtual domain and put it before all of the others. But this is kind of irrelevant, isn't it? When your sites are all working, your default site will never be seen. (There is a case where you want a "no content, so go here" page...but there's a special directive just for that type of error page.)

I know some of the terminology can be confusing in the case of "default" domains. But, just always create your "default" domain first, and everything will fall into place. There's probably an easy way to move a domain to the top of the list using Webmin, but I don't know it off-hand.

NOTE- In the above example commands, a % indicates the command can be run by a non-root user. The # indicates that the command must be run as root, or using sudo.

--

Check out the forum guidelines!

Sun, 06/07/2009 - 06:58
GregMcAbee

Joe,

I think I found part of the issue. I am using a hardware firewall and this is what I wrote them last evening. Hopefully I am on the right track.

"Ticket # 83883 for AP2769193507 does not appear to be resolved and I request an escalation of this ticket. If I am wrong please tell me but the setup for the Firewall seems wrong. I have two IP addresses as shown here.

206.225.82.13/192.168.0.2

206.225.82.154/192.168.0.3

However, an IFCONFIG shows 192.168.0.2 bound to the eth0 and 206.225.82.154 is bound to eth0:1. Shouldnâ

Sun, 06/07/2009 - 06:58
GregMcAbee

Hello Everyone,

Joe,

My ISP has made my requested firewall changes and my default server is now working as designed. a DNS report from DNSREPORT.COM shows that everything for my domain freephpnukehosting.com and indyafterhours.comis now working properly.

If I do a host indyafterhours.com I can see it is resolving correctly internally to an address of 206.225.82.13. Here is where the confusion comes in and I wanted to clarify a coupple of quick points.

1. Can a server behind a firewall host it's own name servers? To some extent that seems to be true because if I go to http://freephpnukehosting.com which is my default domain and where my name servers reside ns1 and ns2 dot freephpnukehosting.com the page comes up on the Internet. This is optimistic!

2. I have worked with your previous suggestions; however, my virtual servers refuse to forward for some reason. It could be a simple step but it is alluding me somehow.

3. Now that ip's have changed to 192.168.0.2 and .3 how should apache be listening for requests? I am not sure if they should be listening to the 206.225.82.13 which is the address on the firewall that is translated to 192.168.0.2 or if they should be listening to just the 192 address.

Thanks,
Greg McAbee

Sun, 06/07/2009 - 06:58
GregMcAbee

Hello Everyone,

Joe,

My ISP has made my requested firewall changes and my default server is now working as designed. a DNS report from DNSREPORT.COM shows that everything for my domain freephpnukehosting.com and indyafterhours.comis now working properly.

If I do a host indyafterhours.com I can see it is resolving correctly internally to an address of 206.225.82.13. Here is where the confusion comes in and I wanted to clarify a coupple of quick points.

1. Can a server behind a firewall host it's own name servers? To some extent that seems to be true because if I go to http://freephpnukehosting.com which is my default domain and where my name servers reside ns1 and ns2 dot freephpnukehosting.com the page comes up on the Internet. This is optimistic!

2. I have worked with your previous suggestions; however, my virtual servers refuse to forward for some reason. It could be a simple step but it is alluding me somehow.

3. Now that ip's have changed to 192.168.0.2 and .3 how should apache be listening for requests? I am not sure if they should be listening to the 206.225.82.13 which is the address on the firewall that is translated to 192.168.0.2 or if they should be listening to just the 192 address.

Thanks,
Greg McAbee

Fri, 09/09/2005 - 10:33
Joe
Joe's picture

Hey Greg,

Ok, let's take this one at a time:

> 1. Can a server behind a firewall host it's own name servers? To some extent that seems to be true because if I go to http://freephpnukehosting.com which is my default domain and where my name servers reside ns1 and ns2 dot freephpnukehosting.com the page comes up on the Internet. This is optimistic!

Your statement in 3 about &quot;192.168.0.2 and .3&quot; leads me to believe you aren't asking about firewalling, but network address translation. A firewall merely blocks ports or doesn't based on some criteria, while network address translation forwards a port or address to another port and/or address. Any service can run behind a firewall, as long as that service is allowed by the firewall rules. Some services cannot run behind a network address translation device, but DNS and web are not among those that can't, assuming the NAT device is correctly configured to forward the appropriate external ports and addresses to the matching internal ports and addresses. This configuration, it sounds like, is the business of your host--not you or Virtualmin. If <i>any</i> NameVirtualHost on your system is working, then we can say with confidence that the configuration is correct.

&gt; 2. I have worked with your previous suggestions; however, my virtual servers refuse to forward for some reason. It could be a simple step but it is alluding me somehow.

Can you clarify what you mean by &quot;forward&quot;? The term forward has several meanings in networking, but I can't figure out from context which meaning you are after here. A webserver doesn't need to &quot;forward&quot; anything in any context I can imagine would apply to you...perhaps you mean it just isn't answering requests?

Anyway, when I go to your addresses I get an Indy After Hours website. Seems like the webserver is working fine. There might be a misconfiguration in the freephpnukehosting.com domain, though.

&gt; 3. Now that ip's have changed to 192.168.0.2 and .3 how should apache be listening for requests? I am not sure if they should be listening to the 206.225.82.13 which is the address on the firewall that is translated to 192.168.0.2 or if they should be listening to just the 192 address.

This one is easy. It's impossible for Apache to listen on an address that doesn't exist on the machine. So, I'm gonna recommend you let it listen on 192.168.0.2 and .3. ;-)

Don't fret too much over the networking side of things. If the NAT device is configured properly, everything will just work. (OK, mail can be an issue, due to spam filters...But we'll cross the bridge when we come to it.)

Anyway, since the webserver is answering queries, you've already handled this question correctly, even if you didn't know it.

So...I think we just need to get you to cut and paste your relevant NameVirtualHost sections from your httpd.conf file. I can't really guess what is misconfigured with the information I have, and that would clear it up real quick.

--

Check out the forum guidelines!

Sun, 06/07/2009 - 06:58
GregMcAbee

This is now solved. A big dose of patience was necessary and I wanted to thank Joe and everyone else that had a comment. It all boiled down to what I see now as a &quot;minor&quot; configuration error.

It helped me the most to concentrate on just getting one web server up first instead of focusing on the giant issue. Once that was up the second one took some tweaking with the firewall IP's and they all work again.

I wanted to thank you for the lesson well learned.
Don't Panic

Joe I didn't realize you wrote the Webmin Manual. Many kudo's to your fine style and dedication to these fine products.

Kind Reegards,
Greg McAbee

Sun, 06/07/2009 - 07:02
GregMcAbee

Hi Joe,

I have many, many serious issues at this point and I am not sure what do. Not sure if you have ever seen a scenario like this before. I am also not sure that Virtualmin is to blame, in fact I don't think so.

After I changed my root password yesterday it sat in that state for some time. I then tried to add a Server and got the error in the title.

After that I quickly realized my entire server was down. I called dedicated support and they helped me resynch my mysql password. But something has been fundamentally wrong ever since.

We tried to restore the webmin config and that blew up forcing us to power down the server. At that point the Server was rebooted and a webmin login would only open a usermin coonfig stating that I had no access to usermin.

I went to the webmin page and found out how to deinstall and reinstall wembmin and that fixed webmin.

However, I am in an odd state because Virtualmin is now blank where my virtual servers were. I cannot restore my virtualmin backup from yesterday because it keeps saying parts still exists. IE users and databases which I have already deleted.

So I have a Wembin backup and a VirtualMin backup from yesterday. Neither one seems to help me out very much.

I know you don't have the kind of time it takes to help with something like this. I was just curious what you would do next if you were me?

Thanks,
Greg McAbee

Sun, 06/07/2009 - 07:02
MichaelConnors

Go into Webmin-&gt;MYSQL.
The server should ask you for a new password and user with a button to SAVE.

Thats it!

Sun, 06/07/2009 - 07:03
MarkCumberland

The last comment about going to the Webmin MySQL module was a simple fix for me as well. I kept getting &quot;Failed to create virtual server : DBI connect failed : Access denied for user: 'root@localhost' (Using password: NO)&quot; and when I saved the password in the Webmin module, all is well.

Topic locked