Results 1 to 4 of 4

Thread: Mysql with databases on HDD

  1. #1
    Junior Member
    Join Date
    Dec 2004
    Posts
    1

    Mysql with databases on HDD

    Hi,

    I need some help with using MySQL databases from Knoppix CD. There were some problems with my linux box because of which it has become unbootable. I am trying to salvage the data (some html/php files and MySQL databases). I can boot using Knoppix CD and can access all my data on hda3 after mounting it. I can even start mysqld both from /mnt/hda3/etc/init.d/ as well as /etc/init.d/. The problem is that both instances read only the databases in /var/lib while my databases are on /mnt/hda3/var/lib. If I do chroot, mysqld won't even start. If I move my database files into /var/lib/mysql from /mnt/hda3/var/lib/mysql, mysqld dies as soon as I start it. I tried changing the datadir in my.cnf but it didn't help.

    All I want to do is backup (mysqldump) a couple of databases and move them over to a new host.

    Could someone please help me out?

    Thanks!

  2. #2
    Member registered user
    Join Date
    Feb 2003
    Location
    Vancouver BC
    Posts
    92
    The mysql versions might be too different.

  3. #3
    Senior Member registered user
    Join Date
    Aug 2003
    Posts
    126

    Re: Mysql with databases on HDD

    Quote Originally Posted by sbb
    Hi,

    I need some help with using MySQL databases from Knoppix CD. There were some problems with my linux box because of which it has become unbootable. I am trying to salvage the data (some html/php files and MySQL databases). I can boot using Knoppix CD and can access all my data on hda3 after mounting it. I can even start mysqld both from /mnt/hda3/etc/init.d/ as well as /etc/init.d/. The problem is that both instances read only the databases in /var/lib while my databases are on /mnt/hda3/var/lib. If I do chroot, mysqld won't even start. If I move my database files into /var/lib/mysql from /mnt/hda3/var/lib/mysql, mysqld dies as soon as I start it. I tried changing the datadir in my.cnf but it didn't help.

    All I want to do is backup (mysqldump) a couple of databases and move them over to a new host.

    Could someone please help me out?

    Thanks!
    Could try something like this as root
    rm -rf /var/lib/mysql
    cp -rp /mnt/hda3/var/lib/mysql /var/lib
    mysqld_safe &

    then
    # Back up data to USB device.

    modprobe usb-storage
    mkdir /mnt/usbstore
    mount -t vfat /dev/sda1 /mnt/usbstore
    mysqldump --opt -u root databasename > /mnt/usbstore/databasename.sql
    umount /mnt/usbstore

    Regards Mark

  4. #4
    Member registered user
    Join Date
    Nov 2004
    Location
    Bellevue, WA
    Posts
    83

    Re: Mysql with databases on HDD

    Quote Originally Posted by sbb
    All I want to do is backup (mysqldump) a couple of databases and move them over to a new host.
    There are many ways of doing this:

    a. The most obvious one is to copy the files from one server to the other
    b. If you still want to do a mysqlump, there is a command line option to set the configuration file to use. In that configuratio file you can specify where the data files are
    c. Make sure that the mysql.socket file is pointing to a rw location (that might have been your problem when it didn't start).
    d. Start the MySQL server in 'console' mode.

    Most of the time you should use a mysqld_safe script that does some housekeeping for you just in case. You can check all these options by using mysqld --help, the text will be version specific.

    Check http://dev.mysql.com/doc/mysql/en/Up...g-to-arch.html for some information in how copy databases between servers.
    Check http://dev.mysql.com/doc/mysql/en/Starting_server.html as a starting point to troubleshooting.

    The mysql versions might be too different.
    The datafiles are backward and forward compatible, check

    --GN

Similar Threads

  1. using Knoppix to access existing mysql databases
    By kennmurrah in forum General Support
    Replies: 0
    Last Post: 02-28-2006, 07:45 PM
  2. MySQL
    By mzee in forum Knoppix DVD
    Replies: 17
    Last Post: 10-12-2005, 08:48 AM
  3. Databases
    By tux_edo in forum Customising & Remastering
    Replies: 1
    Last Post: 01-22-2004, 12:53 PM
  4. [MySQL] Export a DB From PHPMyAdmin to /var/lib/mysql
    By Coume in forum General Support
    Replies: 5
    Last Post: 08-06-2003, 06:42 AM
  5. Get me going with MySQL
    By Terry@nz in forum General Support
    Replies: 3
    Last Post: 06-09-2003, 10:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM picture

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM

$699.00



Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD picture

Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD

$119.99



Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR picture

Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR

$95.20



Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB picture

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB

$149.99



NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER picture

NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER

$1499.97



Datto S4P10 1U Blade Rack Server Intel Xeon D-2143IT 2.20GHz 48GB DDR4 4-Bay PSU picture

Datto S4P10 1U Blade Rack Server Intel Xeon D-2143IT 2.20GHz 48GB DDR4 4-Bay PSU

$229.95



Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays picture

Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays

$799.99



Dell PowerEdge VRTX 2.5

Dell PowerEdge VRTX 2.5"x25 Bay Blade Enclosure 4x1600W + 4X M640 (4X Blades)

$1599.99



Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working picture

Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working

$149.99



Dell Poweredge VRTX 25Bay 2.5

Dell Poweredge VRTX 25Bay 2.5" 2x PERC 8, 2xCMC, I/O 1GB Pass Through, 4x PS

$578.08