Results 1 to 4 of 4

Thread: mysql on startup

Hybrid View

  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    2

    mysql on startup

    Hi All,

    I've created a remastered version of Knoppix 3.9 with apache, php and mysql 4.1 . I'm having a strange problem on startup, Apache starts up OK but when I try to startup mysql it requires four commands (one at boot time) before it will actually start up i.e.

    TRY 1

    root@0[~]# /etc/init.d/mysql start
    Starting MySQL database server: mysqld...failed.
    Please take a look at the syslog.
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

    TRY 2

    root@0[~]# /etc/init.d/mysql start
    Starting MySQL database server: mysqld...failed.
    Please take a look at the syslog.
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

    TRY 3

    root@0[~]# /etc/init.d/mysql start
    Starting MySQL database server: mysqld.
    Checking for crashed MySQL tables in the background.
    root@0[~]#

    Then mysql starts OK

    with mysqld I get

    TRY 1

    root@1[~]# mysqld
    InnoDB: Unable to lock ./ib_logfile0, error: 9
    InnoDB: Error in opening ./ib_logfile0
    050819 11:40:59 [ERROR] Can't init databases
    050819 11:40:59 [ERROR] Aborting

    050819 11:41:00 [Note] mysqld: Shutdown complete

    TRY 2

    root@1[~]# mysqld
    InnoDB: Unable to lock ./ib_logfile1, error: 9
    InnoDB: Error in opening ./ib_logfile1
    050819 11:41:06 [ERROR] Can't init databases
    050819 11:41:06 [ERROR] Aborting

    050819 11:41:07 [Note] mysqld: Shutdown complete

    TRY 3

    root@1[~]# mysqld
    050819 11:41:11 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    050819 11:41:13 InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 43782.
    InnoDB: Doing recovery: scanned up to log sequence number 0 43782
    InnoDB: Last MySQL binlog file position 0 79, file name /var/log/mysql/mysql-bin.000010
    050819 11:41:13 InnoDB: Flushing modified pages from the buffer pool...
    050819 11:41:13 InnoDB: Started; log sequence number 0 43782
    mysqld: ready for connections.
    Version: '4.1.11-Debian_4-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Source distribution

    mysql start OK

    I managed to overcome the problem on startup by having 4 startup scripts, but this extends the startup time by quite a bit so I would like to find a better fix. Has anyone seen this before or know of a fix.

    Thanks

  2. #2
    Junior Member registered user
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    14
    I did the mysql start like this:

    in /KNOPPIX/knoppix.sh I added

    /etc/init.d/mysql stop
    chown -R mysql:mysql /var/lib/mysql
    chmod ugo+rwx /var/lib/mysql/*
    chmod -R ugo+rw /var/lib/mysql
    touch /var/log/mysql/mysql.log
    chown mysql:adm /var/log/mysql/mysql.log
    sleep 5
    /etc/init.d/mysql start

    cat /cdrom/[MyFolder]/sqldb.sql | /usr/bin/mysql -p[TheRootPasswd]

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    2
    Thanks for the reply, is it a permissions problem then. If so, how come it starts up after a few tries?

  4. #4
    Senior Member registered user
    Join Date
    Aug 2003
    Posts
    126
    mysqld_safe may be useful for you to start mysql
    see
    http://dev.mysql.com/doc/mysql/en/mysqld-safe.html

    In the past I used

    rm -rf /var/lib/mysql
    cp -rp /KNOPPIX/var/lib/mysql /var/lib
    mysqld_safe &


    which worked for Knoppix 3.3, but whether it works for 3.9 I don't know.
    The p option to the cp command preserves permissions.
    Regards,
    Mark

Similar Threads

  1. Startup: ssh mysql and apache2 not loaded
    By seballa in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 06-08-2009, 04:47 PM
  2. MySQL on 5.1.1
    By kjackson7_93 in forum General Support
    Replies: 12
    Last Post: 02-03-2007, 11:39 PM
  3. mysql fails on startup
    By jagodragon in forum General Support
    Replies: 0
    Last Post: 12-11-2006, 03:34 AM
  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 VRTX 2.5

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

$1599.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

$96.60



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 M620 Blade Server 2x Xeon E5-2680v2 256GB DDR3 RAM NO HDD picture

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 256GB DDR3 RAM NO HDD

$349.99



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

$197.76



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



Supermicro 938-16 16-LFF MicroCloud SuperServer 5038MR-H8TRF *No Blade Servers* picture

Supermicro 938-16 16-LFF MicroCloud SuperServer 5038MR-H8TRF *No Blade Servers*

$159.99



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



Cisco UCS 5108 Blade Server Chassis Enclosure N20-C6508 4x PSU 8x Fans 2x Fabric picture

Cisco UCS 5108 Blade Server Chassis Enclosure N20-C6508 4x PSU 8x Fans 2x Fabric

$174.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