These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Please help: How to activate MySQL on Virtualmin? on the new forum.
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.
No one has an idea?
OK, I'm going to reinstall Virtualmin again.
[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!
Sorry, to late ;-)
I thought you are sleeping right now. We have here about 10 am.
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!
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?
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
<div class='quote'>2) Click the "Re-check and Refresh Configuration" 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 "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.</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!
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!
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.
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.
<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?
<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!
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.
<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!
Yes, that's clear. It wasn't an issue. I just listed all the steps after installation.
Fresh installation under CentOS instead of Debian:
MySQL connection is just working.