Follow us on Twitter
Joomla Components

Video Games School German Golf shop Find freeware at AC's Freeware Site seo techieBeautiful dresses at dressale.comCool Electronics Gadgets from China

Latest in Blog

Web Server @ Home - Installing MySQL PDF Print E-mail
Web Server @ Home is where this series commenced. This is follow up in same series. Please read it if you want to know motivation behind this discussion.

MySQL is the one of the best Database Server out there. And it is free too!! According to MySQL Official Site (http://www.mysql.com),

The MySQL® database has become the world's most popular open source database because of its consistent fast performance, high reliability and ease of use. It's used in more than 8 million installations ranging from large corporations to specialized embedded applications on every continent in the world. (Yes, even Antarctica!)

Following are detailed instructions on how to install MySQL over cygwin/Windows XP.

We will install MySQL server on Windows XP directly because of performance reasons. We could have installed Apache2 on Windows XP as well but Apache2 needs to be tightly integrated with PHP and other components, Apache was built on cygwin. Also performance loss was minimized by special build process, as discussed in Web Server @ Home - Installing Apache2.

But MySQL client needs to be tightly integrated with PHP/Apache so client needs to be built on Cygwin. For details on Cygwin installation, please read Web Server @ Home - Installing cygwin.

MySQL Server Installation on Windows XP

  • Run installer and go through installation process.
  • After Installation finishes, MySQL Configuration Wizard will pop up.
  • Configuration wizard can be invoked from installation directory or from Start -> Program Files -> MySQL
  • Configure MySQL server per your requirements, keeping following in mind
  • Allow connect through TCP Password.
  • Select Appropriate username & password
  •  Verify MySQL installation
  • Run "MySQL command line client" from MySQL installation directory or from start menu
  • Enter Password, "mysql" prompt will come up
  • Run status and check output to see if everything is okay

MySQL Server Installation on Windows XP

  • Download MySQL source tarball in your cygwin home.
  • Cygwin Home directory is located at <cygwin-installation>/home/<username>.
  • Source Tarball is located towards end on download page (http://dev.mysql.com/downloads/)
  • Open cygwin Bash shell, and you should see mysql-<x.x.x>.tar.gz in the directory. (execute 'ls' to see contents.
  • Unzip and Untar source tarball
tar xvfz mysql-<x.x.x>.tar.gz
  • Change Directory -  cd mysql-<x.x.x>
  • Run Followin Command
configure --prefix=/usr/local/mysql --without-server --with-mysqld-user=<username>
  • Username above is username configured in your MySQL server (See Windows part of installation)
  • make; make install
  • Check if 'make' and 'make install' finish without any error.
  • cp /usr/local/mysql/share/mysql/my-<xxx>.cnf /etc/my.cnf (Any file will do because without server, rest of the options doesn't make any sense. Or lets say copy my-large.cnf)
  • edit /etc/my.cnf
  • Find line containing [client]
  • Add/modify following lines just after,
  •       password = <password>
  •       user     = <user>
  •       protocol = tcp
  •       host     = localhost
  • User Name/Password are the ones which are configured to be used with MySQL server (installed on Windows XP directly). Modify rest of the file according to your needs.
  • type /usr/local/mysql/bin/mysql.exe on bash shell prompt and hit enter.
  • It should run without error, everything should be fine and mysql prompt should come up directly.

Hmmm.... few more steps to go but we are about to finish. Remember basic web server is already installed in previous article and you can start playing with basic stuff like html, java scripts etc. MySQL and PHP are just for more features (Though are very common). Hang in there!!

Next: Installing PHP.. Stay tuned...

Comments
Configuring WIMP and LAMP
ssmaurya 2006-03-29 20:33:26

I was planning on writing th insatllation procedure for WIMP and LAMP. Since you have already started doing that I would suggest you include configuration for both LAMP and WIMP. Recently, I had to install, WIMP and I had tough time making it work with available installation procedure. It's good to see that you are coming up with this. Just mention the version for which you are writing the installtion procedure.
Aside to this, may be we can write an installer for WIMP as well as LAMP, so that it makes life of people easy. What do you say? Should we attempt this. I can try my hands on WIMP but LAMP, it would be tough.
WCAMP
SVTechie 2006-03-29 23:04:32

Actually installation procedue for LAMP is much simpler and better compared to WIMP. Actually MySQL/PHP/Apache are developed for Linux/Unix systems and have much better support. Since svtechie web server is running on Linux (LAMP) so to experiment with stuff, I had to install something equivalent on windows side. And Cygwin provides POSIX layer similar to Linux, it was obvious choice. Even on cygwin, installing these tools is not easy but should be better than WIMP. (Or should I say WCAMP - Windows, Cygwin, Apache, MySQL, PHP).
Performance
SVTechie 2006-03-29 23:05:47

http://research.gc.cuny.edu/index.php/ LAMP_versus_WIMP

Here is an excerpt from an email exchange on the mediawiki-l email list concerning a comparison between MediaWiki (which you are now viewing) under Linux with the Apache web server, and MediaWiki under Windows with the IIS web server (it can be done, but it isn't recommended). The conclusion: MediaWiki runs four times faster under Linux than Windows. In this test, the LAMP server had only half the CPU speed and half the RAM of the Windows server! This suggests a performance improvement with LINUX of eight times that of Windows.
'Guest' 2006-08-05 05:03:48

:confused :evil :eek :razz
Error building Apache2 2.2.2.1 on cygwin
'Guest' 2006-09-01 18:13:37

Great script. But unfortunately I am getting an error on making apache2, which broke the whole installation also.

make complains:

make[1]: *** [/usr/src/httpd-2.2.2/libhttpd2core.la] Error 1

I will go with the windows installer of apache instead of geeking it out. Have fun. :-)
Humpty Dumpty
'Guest' 2007-01-26 07:07:01

Is there any hope for the post of the installation of php on cygwin any time soon?
Only registered users can write comments!
Last Updated on Thursday, 30 March 2006 19:52