Install MySQL database server on linux - window

how to get mysql.

simply you can download mysql from ''

mysql ab makes both source and binary distributions of the mysql database server available for download on its web site.precompiled binary distributions are also easier to install than source distributions.

binary distributions are available for linux, solaris, mac os x, windows xp/7/8 .

source distributions are available for both windows and unix platforms.

installing mysql database server on linux/unix

the recommended way to install mysql on a linux system is via rpm.mysql ab makes the following rpms available for download on its web site :-

  • mysql database server, which manages databases and tables, controls user access, and             processes sql queries.
  • mysql-client programs, which makes it possible to connect to, and interact with the                       server.
  • mysql-devel libraries and header files that come in handy when compiling other                       programs that use mysql.
  • mysql-shared shared libraries for the mysql client.
  • mysql-bench benchmark and performance testing tools for the mysql database server

now follow the following steps to proceed for installation:

  • login to the system using root user

    [user@host]# su - root

  • switch to the directory containing the rpms

    [root@host]# cd /tmp

  • install the mysql database server by executing the following command.
       (remember to replace the filename in italics with the file name of your rpm):

    [root@host]# rpm -i mysql-4.0.9-0.i386.rpm

    above command takes care of installing mysql server creating a user of mysql, creating necessary configuration and starting mysql server automatically.

    you can find all mysql related binaries in /user/bin and /user/sbin.all the databases and tables will be created in /var/lib/mysql directory.

  • this is optional but recommended step to install the remaining rpms in the same manner.
                   [root@host]# rpm    -i          mysql-client-4.0.9-0.i386.rpm
                   [root@host]# rpm    -i          mysql-devel-4.0.9-0.i386.rpm

                   [root@host]# rpm    -i          mysql-shared-4.0.9-0.i386.rpm
                   [root@host]# rpm    -i          mysql-bench-4.0.9-0.i386.rpm

installing mysql database server on windows

installing mysql from a binary distribution follows these steps :-

  • log in as an administrator and unzip the distribution archive to a temporary directory on    your system. extract it.
  • double-click the setup.exe file to begin the installation should see a    welcome next.
  • click browse and select the directory in which mysql is to be installed in this example,    select c:\program files\ next.
  • select the type of installation next
  • click next, and mysql should now begin installing to your system.
  • after installation is complete, you should see a screen and click finish.