Install MySQL on Debian????

Posted on 2006-04-07
Last Modified: 2013-11-15
I am a Linux first timer and am trying to install MySQL 5.0.19 on to Debian V3.1r1

I am using this document as a reference:

I want MySQL to be installed in /etc/mysql

Can someone please tell me how to do this? i.e. where to put the .tar.gz file, etc... im really lost.

Thanks in advance

Question by:bryanford
    LVL 20

    Expert Comment

    Installing application programs ( e.g. MySQL ) in /etc folder is BAD IDEA !!!
    /etc folder in Linux operating system is place where various initialization scripts and configuration files are usually located and
    no other program should be run from within that ( /etc ) folder.
    2. Install MySQL

    apt-get install libmysqlclient6
    apt-get install mysql-client
    apt-get install mysql-server

    PerlLib uses the perl DBI database interface.

    apt-get install libdbd-mysql-perl

    good luck

    Expert Comment

    Hello  Nedvis

    If that's the case, why are so many application and services built in /etc/ by default?


    Daniel Carrion
    LVL 1

    Author Comment

    If i install it by the apt-get method i get the old version, mysql4. I am wanting to install the latest version, mysql 5.0.19
    LVL 20

    Expert Comment

    Hi, dcarrion!
    "If that's the case, why are so many application and services built in /etc/ by default?"
    If you take a look at /etc folder you'l see dosens of programs/services configuration files and scripts rather than program EXECUTABLES  , usually located in   /sbin  ,  /usr/bin ,   /opt , /local  or in users home partitions/directories.
    Under /etc: A Simple Guide   --- >


    LVL 20

    Expert Comment

    On Unix, a tar file binary distribution is installed by unpacking it at the installation location you choose (typically /usr/local/mysql) and creates the following directories in that location:
    Directory       Contents of Directory
    bin       Client programs and the mysqld server
    data       Log files, databases
    docs       Documentation, ChangeLog
    include       Include (header) files
    lib       Libraries
    scripts       mysql_install_db
    share/mysql       Error message files
    sql-bench       Benchmarks
    ( )
    LVL 1

    Accepted Solution

    Pick a mirror from :
     add the two lines to  "/etc/apt/sources.list" (pref. on top)
    > apt-get update
    > apt-cache search mysql
    th previous command should give you a list with mysql related packages on of them is names mysql-server (there is one for version 5.X)
    the full name is the part before the '-'
    > apt-get install <package-name>


    it will not be installed in  /etc/mysql. only the config files will be there but thats the good way (/etc = config) th database files wil be in  /var/lib/mysql (or something) libs and so wil be in the usual places
    LVL 1

    Expert Comment

    If you are using the stable branch and this 5.0 package is not from that branch there is a great chance that it will be removed by a dist-upgrade.  You should either pin it in /etc/preferences or do a dpkg --get-selections> selections , edit selections and change the install next to mysql-server-5.0 to hold, save selections and execute dpkg --set-selections < selections and that will keep it from being removed.  If you are going to be using Debian I recommend reading the apt and dpkg guides and there is a wonderful new book which goes into the depth of the package management system (look on amazon).
    You might also want to go to and look for sources for packages which interest you but be warned if you don't know how to fix a broken system do not try it on a production machine.

    LVL 1

    Author Comment

    Thanks for all your posts,

    verborghs solution was the simplest and quickest way and it worked great.

    Sorry about the delay, i needed to buy new hardware for the debian system.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now