Author Topic: MySQL with eBox  (Read 7311 times)

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
MySQL with eBox
« on: June 22, 2009, 10:54:43 am »
I know from other posts that an eBox server is not intended as a webserver. However I would like to use it as such within the LAN so that it can host web-based database applications. It is not practical to buy another server (not to mention the extra power consumed!). I have installed mysql-server and mysql-client successfully from the CDRom but get an error message when trying to install php5-mysql:

php5-mysql: Depends: php5-common(= 5.2.4-2ubuntu5.4) but 5.2.4-2ubuntu5.6 is to be installed.
E: Broken packages.

This make me think that somehow eBox installed an older php5-common than is on the disk. Should I uninstall then re-install php5-common?

Many thanks for any help.

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: MySQL with eBox
« Reply #1 on: June 22, 2009, 11:28:49 am »
The stable installer has a bug related to sources.list. Check this topic for details:

http://forum.ebox-platform.com/index.php?topic=1342.0

Sorry for any inconvenience.
My secret is my silence...

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #2 on: June 22, 2009, 03:57:09 pm »
Thanks sixstone. My problem is that I cannot connect the box to the Internet (I am working in a College & there are restrictions). In sources.list I have commented out all the Internet-based sources and uncommented the CDRom ones. Is there any reason why the CDRom sources seem to repeat twice at the top of sources.list?

Also - I am now trying to connect to mysql from across the LAN. On the eBox server I can (at the mysql prompt) create a new user that can connect from % with all privileges granted, then flush privileges. However eBox seems to be blocking access from outside the box. In the eBox UI I have added mysql as a service on port 3306, then added mysql to the first entry in the Firewall (internal networks to eBox). eBox is still blocking access from outside the machine (for example when I telnet server_ip 3306 the reply is that the target machine actively refused the connection)/
« Last Edit: June 22, 2009, 05:52:44 pm by normanp »

nicolasdiogo

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 263
  • Karma: +3/-0
  • a pessimist, but trying out optimism
    • View Profile
    • BrainPowered Business Intelligence Consultancy - UK
Re: MySQL with eBox
« Reply #3 on: June 22, 2009, 05:50:58 pm »
out of curiosity..

if you are having trouble connection to your mysql - have you openned the necessary port to allow traffic to gain access to eBox?
normally it is port 3306.

have a look at mysql reference documentation - it is of excellent quality.
http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html

Nicolas
my opinions and suggestion expressed on this forum are my own as a user.
please note that i am not part of the Zentyal Development Team

www.brainpowered.net - supporting open-source Business Intelligence in Europe

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #4 on: June 22, 2009, 05:54:37 pm »
Sorry nicholasdiogo - I was just editing my posting to say that I had done this (see above). I did also tty adding mysql to every Firewall entry out of desperation but still no go. The box is clearly still blocking access to port 3306.

nicolasdiogo

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 263
  • Karma: +3/-0
  • a pessimist, but trying out optimism
    • View Profile
    • BrainPowered Business Intelligence Consultancy - UK
Re: MySQL with eBox
« Reply #5 on: June 22, 2009, 06:06:52 pm »
very unlikely that eBox is blocking your connection.

if you eBox is not connected (or if you can) try this;
turn off the firewall - log into eBox and issue this command

Code: [Select]
sudo /etc/init.d/ebox firewall stop

you can check if mysql is accepting connection by login into it or using nmap

Code: [Select]
nmap -PN <ebox ip>


have you enabled remote connection on mysql - by default it allow only localhost
http://nixcraft.com/databases-servers/804-ubuntu-server-allow-tcp-mysql-connection-remote-system.html


Nicolas
my opinions and suggestion expressed on this forum are my own as a user.
please note that i am not part of the Zentyal Development Team

www.brainpowered.net - supporting open-source Business Intelligence in Europe

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #6 on: June 23, 2009, 10:52:48 am »
Thanks Nicolas - you solved my problem!
As you said - turning off eBox's firewall made no difference...
Because I have only used mysql in xampp I was not aware of this default. BTW the my.cnf doesn't now contain 'skip networking' but has bind-address=127.0.0.1. I just changed this to bind-address=192.168.0.20 (my server's IP) and restarted mysql, and now get access to it remotely (I checked using telnet 192.168.0.20 3306, then connected using SqlYog from an XP machine).
I then turned the eBox firewall back on, and could still connect. I then removed mysql from the list of services in the eBox firewall, saved and was still able to connect! This is weird as I would have expected the eBox firewall to block access to port 3306 by default - obviously not!

This still leaves the problem of adding a php5-mysql to php (see earlier post above).
Anyway thanks again - at least I can write front ends to run on the LAN.

nicolasdiogo

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 263
  • Karma: +3/-0
  • a pessimist, but trying out optimism
    • View Profile
    • BrainPowered Business Intelligence Consultancy - UK
Re: MySQL with eBox
« Reply #7 on: June 23, 2009, 11:01:55 am »
you should not be able to connect to mysql unless you have a service created and allowed it on you firewall configuration.

check you eBox firewall as something seems to be wrong.

maybe you have a rule that says that you can connect from your machine to any port on eBox.

for any package that you needed installed, you do apt-get install <your package>

Code: [Select]
sudo apt-get install php5-mysql

if you are planning in giving access to your website to internet users; i would suggest that you use a virtual machine (vm) instead and redirect all traffic to this vm.
have a look at vmware.

my opinions and suggestion expressed on this forum are my own as a user.
please note that i am not part of the Zentyal Development Team

www.brainpowered.net - supporting open-source Business Intelligence in Europe

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #8 on: June 23, 2009, 02:03:48 pm »
I have tried this but the install fails with this message:

php5-mysql: Depends: php5-common(= 5.2.4-2ubuntu5.4) but 5.2.4-2ubuntu5.6 is to be installed.
E: Broken packages.

It seems as if the packages on the CDRom are mismatched in some way...

BTW This is from the CDRom (I have commented out all except CDRom references in sources.list as I don't have Internet access allowed here).

nicolasdiogo

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 263
  • Karma: +3/-0
  • a pessimist, but trying out optimism
    • View Profile
    • BrainPowered Business Intelligence Consultancy - UK
Re: MySQL with eBox
« Reply #9 on: June 23, 2009, 03:51:11 pm »
try this
Code: [Select]
sudo apt-get update
sudo apt-get install php5-mysql


are you new to linux?

thanks
my opinions and suggestion expressed on this forum are my own as a user.
please note that i am not part of the Zentyal Development Team

www.brainpowered.net - supporting open-source Business Intelligence in Europe

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #10 on: June 23, 2009, 04:13:30 pm »
Yes - pretty new - I have used it off and on for a while but with eBox I would like to get to know it quite well...
The apt-get update gives:
Code: [Select]
Ign cdrom://Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1) hardy/extras Translation-en_GB
Ign cdrom://Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1) hardy/main Translation-en_GB
Ign cdrom://Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1) hardy/restricted Translation-en_GB
Ign cdrom://Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1)  Release.gpg
Ign cdrom://Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1)  Translation-en_GB
Ign cdrom://Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1)  Release
Reading package lists... Done
and the apt-get install php5-mysql gives:
Code: [Select]
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
  php5-mysql: Depends: php5-common (= 5.2.4-2ubuntu5.4) but 5.2.4-2ubuntu5.6 is to be installed
E: Broken packages

Any ideas?
Thanks

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #11 on: June 24, 2009, 03:53:25 pm »
A bit more investigation makes me think that the packages in the eBox installer are not fully compatible with the packages in the rest of the CDRom - is this possible?

It would be helpful if php5-mysql was installed as part of the eBox install!

nicolasdiogo

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 263
  • Karma: +3/-0
  • a pessimist, but trying out optimism
    • View Profile
    • BrainPowered Business Intelligence Consultancy - UK
Re: MySQL with eBox
« Reply #12 on: June 24, 2009, 07:35:42 pm »
hi,

i would not know.

i have always installed ubuntu server and later added eBox repository. so installing the server ubuntu independently.

but try
Code: [Select]
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade

regards
my opinions and suggestion expressed on this forum are my own as a user.
please note that i am not part of the Zentyal Development Team

www.brainpowered.net - supporting open-source Business Intelligence in Europe

normanp

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: MySQL with eBox
« Reply #13 on: June 25, 2009, 04:07:20 pm »
I tried this. The first two commands produced no change, the third suggests upgrading 8 packages including apt and sudo, but no mention of the php related stuff. I went ahead anyway but the problem over the php5-mysql install remains.
Thanks anyway!

nicolasdiogo

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 263
  • Karma: +3/-0
  • a pessimist, but trying out optimism
    • View Profile
    • BrainPowered Business Intelligence Consultancy - UK
Re: MySQL with eBox
« Reply #14 on: June 25, 2009, 05:32:46 pm »
my opinions and suggestion expressed on this forum are my own as a user.
please note that i am not part of the Zentyal Development Team

www.brainpowered.net - supporting open-source Business Intelligence in Europe