Please help: How to activate MySQL on Virtualmin?

17 posts / 0 new
Last post
#1 Mon, 11/10/2008 - 13:51
Karl

Please help: How to activate MySQL on Virtualmin?

Please help: How do I activate MySQL on Virtualmin GPL?

I already installed Virtualmin on two Debian 4.0 sytems without any error messages during installation. It seems the MySQL server is running. If I look at System Information / Status "MySQL Database Server" is running.

But if I create a new virtual server, I always get the error message "Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available".

As far as I understand in the Server template MySQL is activated.

If I look under "Webmin" -- "Servers" there is NO MySQL server. I found it under "Un-used Modules". But I don't know how to activate that module.

Sorry for that dumb question. I already searched for this topic but didn't found a solution.

Mon, 11/10/2008 - 22:08
Karl

No one has an idea?

OK, I'm going to reinstall Virtualmin again.

Mon, 11/10/2008 - 22:58 (Reply to #2)
Joe
Joe's picture

[uoqte]OK, I'm going to reinstall Virtualmin again.[/quote]

What is it with you and reinstalling?

In the Webmin section of the menu, click "Refresh Modules". If that doesn't bring things back to normal, let us know, and I'll walk you through troubleshooting more complex problems.

Reinstalling is pretty much never the right answer (unless you installed manually and want to install using the install.sh automated script, which takes care of a lot of stuff for you automatically...in which case, reinstalling is the best idea I've heard all day). ;-)

--

Check out the forum guidelines!

Mon, 11/10/2008 - 23:14 (Reply to #3)
Karl

Sorry, to late ;-)

I thought you are sleeping right now. We have here about 10 am.

Mon, 11/10/2008 - 23:21 (Reply to #4)
Joe
Joe's picture

Obviously, I should be sleeping, since I can't even markup quotes correctly. ;-)

It's 1:20AM here. And I'm finally giving up for the night (I try to finish email every day, but I almost never make it, and end up catching up on the weekends).

--

Check out the forum guidelines!

Tue, 11/11/2008 - 02:17 (Reply to #5)
Karl

Now I installed Virtualmin on a fresh installed Debian 4.0 but again without success regarding MySQL connection. I did the following steps:

1) Automatic installation of Virtualmin using install script: o.k., no errors.

2) Click the "Re-check and Refresh Configuration" button: It tells me to set a root password for MySQL: Root password for MySQL set.

3) In Webmin clicked the "Refresh Modules" button.

4) Click "Create Virtual Server": Error message: "Failed to create virtual server : Mailman cannot be enabled unless the administration list mailman has been created.This can be done in the Mailman plugin module."

5) Mailman plugin deactivated.

6) Click "Create Virtual Server" again: New Virtual Server was created, no errors.

7) Checked MySQL: No connection to MySQL server.

Should I try with CentOS instead of Debian? Any ideas?

Tue, 11/11/2008 - 04:35 (Reply to #6)
andreychek

Hmm... using the command line, if you type this:

grep pass= /etc/webmin/mysql/config

You'll see the password Virtualmin is setup to use for MySQL.

If you type this on the command line:

mysql -u root -p

And when prompted, enter the password you saw above, does it take you to the MySQL command line, or do you get an error of some sort?
-Eric

Tue, 11/11/2008 - 09:43 (Reply to #7)
Joe
Joe's picture

<div class='quote'>2) Click the &quot;Re-check and Refresh Configuration&quot; button: It tells me to set a root password for MySQL: Root password for MySQL set.</div>

Yes. You need to set a root password for MySQL. You can do that in the Webmin MySQL module. (Or you can set it from the command line.)

We can't set it for you automatically during installation because we don't know what you want the root MySQL password to be. And we can't (safely) leave it unset, because that would allow local users to access MySQL as root.

What should we do to make that more clear?

<div class='quote'>4) Click &quot;Create Virtual Server&quot;: Error message: &quot;Failed to create virtual server : Mailman cannot be enabled unless the administration list mailman has been created.This can be done in the Mailman plugin module.&quot;

5) Mailman plugin deactivated.</div>

So, this should have been done automatically, which is a bug in the installer--filing a bug in the tracker about it will get it fixed. But, it tells you <i>exactly</i> what to do to fix it. I don't understand what more you want me to tell you about it. ;-)

<div class='quote'>7) Checked MySQL: No connection to MySQL server.</div>

So, I see that this one seems to have magically resolved itself (it wasn't the installation of php-mysql that fixed it, but you're reporting it fixed, so something fixed it!). ;-)

I'll do a test install on Debian this afternoon and see if any of these problems present for me. Hopefully, I'll be able to reproduce it. Particularly the Mailman and MySQL unavailable thing, as those are actual bugs.

--

Check out the forum guidelines!

Tue, 11/11/2008 - 09:56 (Reply to #8)
Joe
Joe's picture

Be aware that even on CentOS you're going to have to set a root password for MySQL. That's not something that will magically go away when using a better tested OS. It only takes 30 seconds, though, so don't let it intimidate you. ;-)

--

Check out the forum guidelines!

Tue, 11/11/2008 - 05:05 (Reply to #9)
Karl

A server administrator told me to try this:

apt-get install php5-mysql
/etc/init.d/apache2 restart

After then it works!

Since I had this error now on three different installations on fresh Debian 4.0 it looks like the Virtualmin installation misses this step for any reasons.

Tue, 11/11/2008 - 07:39 (Reply to #10)
ronald
ronald's picture

I dont know if virtualmin is supposed to install php-mysql by default actually.

When I started out I first went with Debian, but I rapidly switched to CentOS. Most parts of the two are the same, but the little differences is what mattered to me. For me Virtualmin and CentOS was really an out-of-the-box solution.

Tweaking and setting stuff to my needs is what came next of course, I think that included yum install php-mysql and a few others I wanted.

Tue, 11/11/2008 - 08:04 (Reply to #11)
Karl

<b>ronald wrote:</b>
<div class='quote'>I dont know if virtualmin is supposed to install php-mysql by default actually.</div>
Sounds strange to me.

<b>ronald wrote:</b>
<div class='quote'>When I started out I first went with Debian, but I rapidly switched to CentOS. Most parts of the two are the same, but the little differences is what mattered to me. For me Virtualmin and CentOS was really an out-of-the-box solution.</div>
On another thread Joe recommended using of Debian but maybe you are right. I should switch to CentOS too.

<b>ronald wrote:</b>
<div class='quote'>Tweaking and setting stuff to my needs is what came next of course, I think that included yum install php-mysql and a few others I wanted.</div>
What else did you install?

Tue, 11/11/2008 - 09:28 (Reply to #12)
Joe
Joe's picture

<div class='quote'>On another thread Joe recommended using of Debian but maybe you are right. I should switch to CentOS too.</div>

I recommend, in order:

CentOS 5
Debian 4.0
Ubuntu 8.04 LTS

The reason for this order is because CentOS 5 has (at least) ten times the number of Virtualmin users using it, so it gets a <i>huge</i> amount more testing. Debian is second...so it has been better tested than Ubuntu 8.04, and so on. We just get far fewer useful bug reports about Debian and Ubuntu installs than CentOS, so it just doesn't get the same amount of attention. For folks who love Debian or Ubuntu, and want things to get better, you'll need to file bugs about problems you run into. We can't fix what we don't know about.

Anyway, we like them all. I have CentOS 4 and 5 on all of our servers, Jamie runs Ubuntu on a couple of his machines, and I run Fedora 9 on my desktop, Debian 4.0 on my devel server, and Ubuntu on my laptop. They are all fine operating systems...but, if you don't know a lot about what you're doing, you should just do what the crowd is doing. And, in this case, the crowd is very clearly using CentOS 5.

We also have a few users getting great use out of Solaris (the Joyent folks, for example, use Solaris on all of their boxes) and FreeBSD.

I discourage use of Fedora and any version of Ubuntu that isn't LTS, because their lifecycle is way too short for a server. You're just asking to suffer.

--

Check out the forum guidelines!

Tue, 11/11/2008 - 09:42 (Reply to #13)
Karl

No, I did really nothing else than this. It was just a matter of some minutes. It was the only thing I did.

But anyway I'm right now switching to CentOS.

Tue, 11/11/2008 - 09:29 (Reply to #14)
Joe
Joe's picture

<div class='quote'>A server administrator told me to try this:

apt-get install php5-mysql
/etc/init.d/apache2 restart

After then it works!</div>

This makes no sense at all. Webmin and Virtualmin don't use PHP for anything. A PHP MySQL module would have no bearing at all on Webmin or Virtualmin. You must have done something else that fixed it. It certainly was <i>not</i> installation of a PHP module that altered things. ;-)

--

Check out the forum guidelines!

Tue, 11/11/2008 - 10:21 (Reply to #15)
Karl

Yes, that's clear. It wasn't an issue. I just listed all the steps after installation.

Tue, 11/11/2008 - 10:47 (Reply to #16)
Karl

Fresh installation under CentOS instead of Debian:

MySQL connection is just working.

Topic locked