Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Setup Apache and Mysql on different machines

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
xathin
n00b
n00b
User avatar
Posts: 64
Joined: Tue Sep 05, 2006 8:11 pm
Location: Vancouver, BC

Setup Apache and Mysql on different machines

  • Quote

Post by xathin » Tue Jan 12, 2010 7:50 pm

I have been searching over the internet for a while trying to find a way to do this, but I haven't been able to find anything, or I've been searching for the wrong things.

What I'm trying to do is to have one machine run Apache, PHP, PHPMyAdmin, etc, and another machine to run MySQL (possibly some other things as well). When installing PHPMyAdmin, or anything else which has mysql(i) use flags, it automatically pulls in MySQL. I would like to know if it's possible to have the MySQL support on the Apache machine without actually installing MySQL on it, and have it recognize that it is installed on another machine.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Tue Jan 12, 2010 10:49 pm

just had a quick look at the ebuilds in question

-the php ebuild does not pull in mysql, nor recognize the 'mysql' use flag
-the apache ebuild does not pull in mysql, nor recognize the 'mysql' use flag

you can confirm the same with a quick:

Code: Select all

laptop02 ~ # grep -i mysql /usr/portage/dev-lang/php/php-5.2.12.ebuild
laptop02 ~ # grep -i mysql /usr/portage/www-servers/apache/apache-2.2.14-r1.ebuild
laptop02 ~ #
so your solution would be to emerge only php and apache on the one server
but do NOT do the installation of phpmyadmin through portage. Myself and many others recommend doing your installation of webapps outside of portage, the old fashioned way.
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
xathin
n00b
n00b
User avatar
Posts: 64
Joined: Tue Sep 05, 2006 8:11 pm
Location: Vancouver, BC

  • Quote

Post by xathin » Tue Jan 12, 2010 11:10 pm

I realize that apache does not have mysql use flag, but php definately does. If you do 'emerge -pv php', you will see both mysql and mysqli in the use flags.

Without the mysql or mysqli use flags in php enabled, IIRC phpmyadmin will not install through portage (rebuilding php as I write to test). Is this true if not installing phpmyadmin through portage?

Also, would the same be true for things like django and dev-python/mysql-python?
Top
xathin
n00b
n00b
User avatar
Posts: 64
Joined: Tue Sep 05, 2006 8:11 pm
Location: Vancouver, BC

  • Quote

Post by xathin » Wed Jan 13, 2010 1:06 am

Ok, rebuilt php without the mysql and mysqli flags, downloaded the latest phpmyadmin (3.2.5), and got this message when trying to access the phpmyadmin site:

Code: Select all

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation
I'm assuming this is due to not having mysql support built into php. But to have mysql support (with use flags), mysql gets pulled in automatically. Either I'm doing something wrong, or I'm just missing something with this setup.
Top
Mad Merlin
Veteran
Veteran
Posts: 1155
Joined: Mon May 09, 2005 7:37 pm
Contact:
Contact Mad Merlin
Website

  • Quote

Post by Mad Merlin » Wed Jan 13, 2010 5:16 am

Try enabling the minimal USE flag for the mysql ebuild, that way it won't build the server, just the headers and client libraries. You definitely need the headers and client libraries to connect to a remote mysql instance.
Game! - Where the stick is mightier than the sword!
Top
Post Reply

5 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic