LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-07-2005, 01:58 AM   #1
waynejkruse10
Member
 
Registered: May 2005
Posts: 56

Rep: Reputation: 15
Mysql, doesnt seem to want to run


I finally got my server working using the guide on wiki.ubuntu.com

But occasionly, i go to phpmyadmin and i get this:

Quote:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Which means mysql isnt running. I re-install mysql and it works, but then stops running again after a little while.

Why does this happen?? and how can i fix it.

I also check by going into terminal and typing mysqladmin and i get that same error.

Wayne
 
Old 10-07-2005, 04:10 AM   #2
dylants
Member
 
Registered: Oct 2003
Location: Bath UK
Distribution: RedHat 7,9 RHEL 2.1-4 Suse 9.1, 9.2, Ubuntu, Centos 3-4, Fedora 3-5
Posts: 44

Rep: Reputation: 15
Does it stop working after a reboot? If so you need to set it to start when the machine boots.

If this is not the cause of the failure - do the mysql and system logs give any clues?
(/var/log/mysql.log or /var/log/mysqld.log and /var/log/messages)

Dylan
 
Old 10-07-2005, 04:13 AM   #3
waynejkruse10
Member
 
Registered: May 2005
Posts: 56

Original Poster
Rep: Reputation: 15
syslog gives me this: check that mysqld is running and the socket /var/run/mysqld/mysqld.sock exists
 
Old 10-07-2005, 04:15 AM   #4
dylants
Member
 
Registered: Oct 2003
Location: Bath UK
Distribution: RedHat 7,9 RHEL 2.1-4 Suse 9.1, 9.2, Ubuntu, Centos 3-4, Fedora 3-5
Posts: 44

Rep: Reputation: 15
You need to go farther back in your logs to find the point at which the mysql daemon stopped.

What distro are you using?
 
Old 10-07-2005, 04:24 AM   #5
waynejkruse10
Member
 
Registered: May 2005
Posts: 56

Original Poster
Rep: Reputation: 15
im using ubuntu

Quote:
Oct 7 18:44:27 localhost kernel: devfs: boot_options: 0x0
Oct 7 18:44:27 localhost kernel: Initializing Cryptographic API
Oct 7 18:44:27 localhost kernel: isapnp: Scanning for PnP cards...
Oct 7 18:44:27 localhost kernel: isapnp: No Plug & Play device found
Oct 7 18:44:27 localhost kernel: serio: i8042 AUX port at 0x60,0x64 irq 12
Oct 7 18:44:27 localhost kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Oct 7 18:44:27 localhost kernel: Serial: 8250/16550 driver $Revision: 1.90 $ 54 ports, IRQ sharing enabled
Oct 7 18:44:27 localhost kernel: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Oct 7 18:44:27 localhost kernel: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Oct 7 18:44:27 localhost kernel: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Oct 7 18:44:27 localhost kernel: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Oct 7 18:44:27 localhost kernel: io scheduler noop registered
Oct 7 18:44:27 localhost kernel: io scheduler anticipatory registered
Oct 7 18:44:27 localhost kernel: io scheduler deadline registered
Oct 7 18:44:27 localhost kernel: io scheduler cfq registered
Oct 7 18:44:27 localhost kernel: RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Oct 7 18:44:27 localhost kernel: input: AT Translated Set 2 keyboard on isa0060/serio0
Oct 7 18:44:27 localhost kernel: EISA: Probing bus 0 at eisa0
Oct 7 18:44:27 localhost kernel: Cannot allocate resource for EISA slot 4
Oct 7 18:44:27 localhost kernel: EISA: Detected 0 cards.
Oct 7 18:44:27 localhost kernel: NET: Registered protocol family 2
Oct 7 18:44:27 localhost kernel: IP: routing cache hash table of 4096 buckets, 32Kbytes
Oct 7 18:44:27 localhost kernel: TCP: Hash tables configured (established 32768 bind 65536)
Oct 7 18:44:27 localhost kernel: NET: Registered protocol family 8
Oct 7 18:44:27 localhost kernel: NET: Registered protocol family 20
Oct 7 18:44:27 localhost kernel: Restarting tasks...<6> Strange, kswapd0 not stopped
Oct 7 18:44:27 localhost kernel: Strange, kseriod not stopped
Oct 7 18:44:27 localhost kernel: done
Oct 7 18:44:27 localhost kernel: ACPI wakeup devices:
Oct 7 18:44:27 localhost kernel: SLPB PCI0 HUB0 USB0 UAR1 UAR2 LPT1
Oct 7 18:44:27 localhost kernel: ACPI: (supports S0 S1 S4 S5)
Oct 7 18:44:27 localhost kernel: RAMDISK: cramfs filesystem found at block 0
Oct 7 18:44:27 localhost kernel: RAMDISK: Loading 4248KiB [1 disk] into ram disk... |^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^
H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^
H-^H\^H|^H/^H-^H\^H
|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|
^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^
H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H
/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/
^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^
H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H
-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
^
H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^Hdone.
Oct 7 18:44:27 localhost kernel: VFS: Mounted root (cramfs filesystem) readonly.
Oct 7 18:44:27 localhost kernel: Freeing unused kernel memory: 224k freed
Oct 7 18:44:27 localhost kernel: ACPI: Fan [FAN] (on)
Oct 7 18:44:27 localhost kernel: ACPI: CPU0 (power states: C1[C1] C2[C2])
Oct 7 18:44:27 localhost kernel: ACPI: Processor [CPU0] (supports 2 throttling states)
Oct 7 18:44:27 localhost kernel: ACPI: Thermal Zone [THRM] (34 C)
Oct 7 18:44:27 localhost kernel: NET: Registered protocol family 1
Oct 7 18:44:27 localhost kernel: Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
Oct 7 18:44:27 localhost kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Oct 7 18:44:27 localhost kernel: ICH: IDE controller at PCI slot 0000:00:1f.1
Oct 7 18:44:27 localhost kernel: ICH: chipset revision 2
Oct 7 18:44:27 localhost kernel: ICH: not 100%% native mode: will probe irqs later
Oct 7 18:44:27 localhost kernel: ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hdaio, hdbMA
Oct 7 18:44:27 localhost kernel: ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdcMA, hddio
Oct 7 18:44:27 localhost kernel: Probing IDE interface ide0...
Oct 7 18:44:27 localhost kernel: hdb: QUANTUM FIREBALLlct20 10, ATA DISK drive
Oct 7 18:44:27 localhost kernel: elevator: using anticipatory as default io scheduler
Oct 7 18:44:27 localhost kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Oct 7 18:44:27 localhost kernel: hdb: max request size: 128KiB
Oct 7 18:44:27 localhost kernel: hdb: 20044080 sectors (10262 MB) w/418KiB Cache, CHS=19885/16/63, UDMA(66)
Oct 7 18:44:27 localhost kernel: hdb: cache flushes not supported
Oct 7 18:44:27 localhost kernel: /dev/ide/host0/bus0/target1/lun0: p1 p2 < p5 >
Oct 7 18:44:27 localhost kernel: Probing IDE interface ide1...
Oct 7 18:44:27 localhost kernel: hdc: CREATIVECD-RW RW3260E E109 20020227, ATAPI CD/DVD-ROM drive
Oct 7 18:44:27 localhost kernel: ide1 at 0x170-0x177,0x376 on irq 15
Oct 7 18:44:27 localhost kernel: Probing IDE interface ide2...
Oct 7 18:44:27 localhost kernel: Probing IDE interface ide3...
Oct 7 18:44:27 localhost kernel: Probing IDE interface ide4...
Oct 7 18:44:27 localhost kernel: Probing IDE interface ide5...
Oct 7 18:44:27 localhost kernel: Stopping tasks: ==|
Oct 7 18:44:27 localhost kernel: Freeing memory... ^H-^H\^H|^H/^Hdone (455 pages freed)
Oct 7 18:44:27 localhost kernel: Restarting tasks... done
Oct 7 18:44:27 localhost kernel: EXT3-fs: mounted filesystem with ordered data mode.
Oct 7 18:44:27 localhost kernel: kjournald starting. Commit interval 5 seconds
Oct 7 18:44:27 localhost kernel: Adding 441748k swap on /dev/hdb5. Priority:-1 extents:1
Oct 7 18:44:27 localhost kernel: EXT3 FS on hdb1, internal journal
Oct 7 18:44:27 localhost kernel: hdc: ATAPI 40X CD-ROM CD-R/RW drive, 8192kB Cache
Oct 7 18:44:27 localhost kernel: Uniform CD-ROM driver Revision: 3.20
Oct 7 18:44:27 localhost kernel: parport: PnPBIOS parport detected.
Oct 7 18:44:27 localhost kernel: parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
Oct 7 18:44:27 localhost kernel: lp0: using parport0 (interrupt-driven).
Oct 7 18:44:27 localhost kernel: mice: PS/2 mouse device common for all mice
Oct 7 18:44:27 localhost kernel: input: ImPS/2 Generic Wheel Mouse on isa0060/serio1
Oct 7 18:44:27 localhost kernel: ts: Compaq touchscreen protocol output
Oct 7 18:44:27 localhost kernel: Capability LSM initialized
Oct 7 18:44:27 localhost kernel: device-mapper: 4.3.0-ioctl (2004-09-30) initialised: dm-devel@redhat.com
Oct 7 18:44:27 localhost kernel: md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
Oct 7 18:44:27 localhost kernel: cdrom: open failed.
Oct 7 18:44:27 localhost kernel: Real Time Clock Driver v1.12
Oct 7 18:44:27 localhost kernel: input: PC Speaker
Oct 7 18:44:27 localhost kernel: inserting floppy driver for 2.6.10-5-386
Oct 7 18:44:27 localhost kernel: Floppy drive(s): fd0 is 1.44M
Oct 7 18:44:27 localhost kernel: FDC 0 is a post-1991 82077
Oct 7 18:44:27 localhost kernel: Linux agpgart interface v0.100 (c) Dave Jones
Oct 7 18:44:27 localhost kernel: agpgart: Detected an Intel i815 Chipset.
Oct 7 18:44:27 localhost kernel: agpgart: Maximum main memory to use for agp memory: 439M
Oct 7 18:44:27 localhost kernel: agpgart: AGP aperture is 64M @ 0xd0000000
Oct 7 18:44:27 localhost kernel: cpci_hotplug: CompactPCI Hot Plug Core version: 0.2
Oct 7 18:44:27 localhost kernel: pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Oct 7 18:44:27 localhost kernel: shpchp: acpi_shpchprm:\_SB_.PCI0 evaluate _BBN fail=0x5
Oct 7 18:44:27 localhost kernel: shpchp: acpi_shpchprm:get_device PCI ROOT HID fail=0x5
Oct 7 18:44:27 localhost kernel: pciehp: acpi_pciehprm:\_SB_.PCI0 evaluate _BBN fail=0x5
Oct 7 18:44:27 localhost kernel: pciehp: acpi_pciehprm:get_device PCI ROOT HID fail=0x5
Oct 7 18:44:27 localhost kernel: shpchp: acpi_shpchprm:\_SB_.PCI0 evaluate _BBN fail=0x5
Oct 7 18:44:27 localhost kernel: shpchp: acpi_shpchprm:get_device PCI ROOT HID fail=0x5
Oct 7 18:44:27 localhost kernel: pciehp: acpi_pciehprm:\_SB_.PCI0 evaluate _BBN fail=0x5
Oct 7 18:44:27 localhost kernel: pciehp: acpi_pciehprm:get_device PCI ROOT HID fail=0x5
Oct 7 18:44:27 localhost kernel: hw_random hardware driver 1.0.0 loaded
Oct 7 18:44:27 localhost kernel: usbcore: registered new driver usbfs
Oct 7 18:44:27 localhost kernel: usbcore: registered new driver hub
Oct 7 18:44:27 localhost kernel: USB Universal Host Controller Interface driver v2.2
Oct 7 18:44:27 localhost kernel: ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
Oct 7 18:44:27 localhost kernel: PCI: setting IRQ 11 as level-triggered
Oct 7 18:44:27 localhost kernel: ACPI: PCI interrupt 0000:00:1f.2[D] -> GSI 11 (level, low) -> IRQ 11
Oct 7 18:44:27 localhost kernel: uhci_hcd 0000:00:1f.2: Intel Corp. 82801AA USB
Oct 7 18:44:27 localhost kernel: PCI: Setting latency timer of device 0000:00:1f.2 to 64
Oct 7 18:44:27 localhost kernel: uhci_hcd 0000:00:1f.2: irq 11, io base 0xd000
Oct 7 18:44:27 localhost kernel: uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
Oct 7 18:44:27 localhost kernel: hub 1-0:1.0: USB hub found
Oct 7 18:44:27 localhost kernel: hub 1-0:1.0: 2 ports detected
Oct 7 18:44:27 localhost kernel: ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
Oct 7 18:44:27 localhost kernel: ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 11 (level, low) -> IRQ 11
Oct 7 18:44:27 localhost kernel: PCI: Setting latency timer of device 0000:00:1f.5 to 64
Oct 7 18:44:27 localhost kernel: intel8x0_measure_ac97_clock: measured 49794 usecs
Oct 7 18:44:27 localhost kernel: intel8x0: clocking to 48000
Oct 7 18:44:27 localhost kernel: 8139too Fast Ethernet driver 0.9.27
Oct 7 18:44:27 localhost kernel: ACPI: PCI interrupt 0000:02:03.0[A] -> GSI 11 (level, low) -> IRQ 11
Oct 7 18:44:27 localhost kernel: eth0: RealTek RTL8139 at 0xc000, 00:30:bd:2e:55:14, IRQ 11
Oct 7 18:44:27 localhost kernel: eth0: Identified 8139 chip type 'RTL-8100B/8139D'
Oct 7 18:44:27 localhost kernel: 8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)
Oct 7 18:44:27 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Oct 7 18:44:27 localhost kernel: NET: Registered protocol family 17
Oct 7 18:44:27 localhost kernel: NET: Registered protocol family 10
Oct 7 18:44:27 localhost kernel: Disabled Privacy Extensions on device c02f0500(lo)
Oct 7 18:44:27 localhost kernel: IPv6 over IPv4 tunneling driver
Oct 7 18:44:28 localhost udev[5338]: creating device node '/dev/vcs2'
Oct 7 18:44:28 localhost udev[5340]: creating device node '/dev/vcsa2'
Oct 7 18:44:28 localhost udev[5350]: creating device node '/dev/vcs5'
Oct 7 18:44:28 localhost udev[5342]: creating device node '/dev/vcs3'
Oct 7 18:44:28 localhost udev[5344]: creating device node '/dev/vcsa3'
Oct 7 18:44:28 localhost udev[5346]: creating device node '/dev/vcs4'
Oct 7 18:44:28 localhost udev[5348]: creating device node '/dev/vcsa4'
Oct 7 18:44:28 localhost udev[5352]: creating device node '/dev/vcsa5'
Oct 7 18:44:28 localhost udev[5354]: creating device node '/dev/vcs6'
Oct 7 18:44:28 localhost udev[5356]: creating device node '/dev/vcsa6'
Oct 7 18:44:28 localhost udev[5428]: removing device node '/dev/vcs6'
Oct 7 18:44:28 localhost udev[5420]: creating device node '/dev/vcs7'
Oct 7 18:44:28 localhost udev[5422]: creating device node '/dev/vcsa7'
Oct 7 18:44:28 localhost udev[5444]: removing device node '/dev/vcsa6'
Oct 7 18:44:28 localhost udev[5463]: removing device node '/dev/vcs5'
Oct 7 18:44:28 localhost udev[5469]: removing device node '/dev/vcsa5'
Oct 7 18:44:28 localhost udev[5481]: removing device node '/dev/vcs4'
Oct 7 18:44:28 localhost udev[5487]: removing device node '/dev/vcsa4'
Oct 7 18:44:28 localhost udev[5500]: removing device node '/dev/vcsa3'
Oct 7 18:44:28 localhost udev[5509]: removing device node '/dev/vcs2'
Oct 7 18:44:28 localhost udev[5515]: removing device node '/dev/vcsa2'
Oct 7 18:44:28 localhost udev[5528]: removing device node '/dev/vcs3'
Oct 7 18:44:28 localhost udev[5581]: removing device node '/dev/vcs7'
Oct 7 18:44:28 localhost udev[5587]: removing device node '/dev/vcsa7'
Oct 7 18:44:29 localhost kernel: ACPI: Power Button (FF) [PWRF]
Oct 7 18:44:29 localhost kernel: ACPI: Sleep Button (CM) [SLPB]
Oct 7 18:44:29 localhost kernel: ibm_acpi: ec object not found
Oct 7 18:44:31 localhost udev[5871]: creating device node '/dev/vcs7'
Oct 7 18:44:31 localhost udev[5873]: creating device node '/dev/vcsa7'
Oct 7 18:44:31 localhost kernel: eth0: no IPv6 routers present
Oct 7 18:44:32 localhost kernel: apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)
Oct 7 18:44:32 localhost kernel: apm: overridden by ACPI.
Oct 7 18:44:35 localhost mysqld_safe[6089]: started
Oct 7 18:44:36 localhost mysqld[6092]: 051007 18:44:36 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
Oct 7 18:44:36 localhost mysqld[6092]: 051007 18:44:36 Aborting
Oct 7 18:44:36 localhost mysqld[6092]:
Oct 7 18:44:36 localhost mysqld[6092]: 051007 18:44:36 /usr/sbin/mysqld: Shutdown Complete
Oct 7 18:44:36 localhost mysqld[6092]:
Oct 7 18:44:36 localhost mysqld_safe[6115]: ended
Oct 7 18:44:41 localhost /etc/init.d/mysql[6153]: 0 processes alive and '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf ping' resulted in
Oct 7 18:44:41 localhost /etc/init.d/mysql[6153]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Oct 7 18:44:41 localhost /etc/init.d/mysql[6153]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Oct 7 18:44:41 localhost /etc/init.d/mysql[6153]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Oct 7 18:44:41 localhost /etc/init.d/mysql[6153]:
Oct 7 18:44:44 localhost postfix/master[6204]: daemon started -- version 2.1.5
Oct 7 18:44:48 localhost proftpd[6524]: localhost.localdomain - ProFTPD 1.2.10 (stable) (built do mrt 22 18:28:32 CET 2001) standalone mode STARTUP
Oct 7 18:44:48 localhost anacron[6530]: Anacron 2.3 started on 2005-10-07
Oct 7 18:44:48 localhost anacron[6530]: Normal exit (0 jobs run)
Oct 7 18:44:48 localhost /usr/sbin/cron[6551]: (CRON) INFO (pidfile fd = 3)
Oct 7 18:44:48 localhost /usr/sbin/cron[6552]: (CRON) STARTUP (fork ok)
Oct 7 18:44:48 localhost /usr/sbin/cron[6552]: (CRON) INFO (Running @reboot jobs)
Oct 7 18:44:50 localhost udev[6599]: creating device node '/dev/vcs3'
Oct 7 18:44:50 localhost udev[6601]: creating device node '/dev/vcs2'
Oct 7 18:44:50 localhost udev[6603]: creating device node '/dev/vcs4'
Oct 7 18:44:50 localhost udev[6609]: creating device node '/dev/vcsa4'
Oct 7 18:44:50 localhost udev[6617]: creating device node '/dev/vcsa5'
Oct 7 18:44:50 localhost udev[6605]: creating device node '/dev/vcsa3'
Oct 7 18:44:50 localhost udev[6607]: creating device node '/dev/vcsa2'
Oct 7 18:44:50 localhost udev[6611]: creating device node '/dev/vcs6'
Oct 7 18:44:50 localhost udev[6613]: creating device node '/dev/vcs5'
Oct 7 18:44:50 localhost udev[6615]: creating device node '/dev/vcsa6'
Oct 7 18:59:27 localhost gconfd (wayne-6740): starting (version 2.10.0), pid 6740 user 'wayne'
Oct 7 18:59:27 localhost gconfd (wayne-6740): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0
Oct 7 18:59:27 localhost gconfd (wayne-6740): Resolved address "xml:readwrite:/home/wayne/.gconf" to a writable configuration source at position 1
Oct 7 18:59:27 localhost gconfd (wayne-6740): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2
Oct 7 18:59:52 localhost gconfd (wayne-6740): Resolved address "xml:readwrite:/home/wayne/.gconf" to a writable configuration source at position 0
Oct 7 19:02:45 localhost mysqld_safe[6933]: started
Oct 7 19:02:45 localhost mysqld[6936]: 051007 19:02:45 Warning: Can't create test file /var/lib/mysql/ubuntu.lower-test
Oct 7 19:02:45 localhost mysqld[6936]: Warning: One can only use the --user switch if running as root
Oct 7 19:02:45 localhost mysqld[6936]: 051007 19:02:45 Can't start server : Bind on unix socket: Permission denied
Oct 7 19:02:45 localhost mysqld[6936]: 051007 19:02:45 Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
Oct 7 19:02:45 localhost mysqld[6936]: 051007 19:02:45 Aborting
Oct 7 19:02:45 localhost mysqld[6936]:
Oct 7 19:02:45 localhost mysqld[6936]: 051007 19:02:45 /usr/sbin/mysqld: Shutdown Complete
Oct 7 19:02:45 localhost mysqld[6936]:
Oct 7 19:02:45 localhost mysqld_safe[6938]: ended
Oct 7 19:02:51 localhost /etc/init.d/mysql[6982]: 0 processes alive and '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf ping' resulted in
Oct 7 19:02:51 localhost /etc/init.d/mysql[6982]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Oct 7 19:02:51 localhost /etc/init.d/mysql[6982]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Oct 7 19:02:51 localhost /etc/init.d/mysql[6982]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Oct 7 19:02:51 localhost /etc/init.d/mysql[6982]:
Oct 7 19:03:52 localhost mysqld_safe[7042]: started
Oct 7 19:03:52 localhost mysqld[7045]: 051007 19:03:52 Warning: Can't create test file /var/lib/mysql/ubuntu.lower-test
Oct 7 19:03:52 localhost mysqld[7045]: Warning: One can only use the --user switch if running as root
Oct 7 19:03:52 localhost mysqld[7045]: 051007 19:03:52 Can't start server : Bind on unix socket: Permission denied
Oct 7 19:03:52 localhost mysqld[7045]: 051007 19:03:52 Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
Oct 7 19:03:52 localhost mysqld[7045]: 051007 19:03:52 Aborting
Oct 7 19:03:52 localhost mysqld[7045]:
Oct 7 19:03:52 localhost mysqld[7045]: 051007 19:03:52 /usr/sbin/mysqld: Shutdown Complete
Oct 7 19:03:52 localhost mysqld[7045]:
Oct 7 19:03:52 localhost mysqld_safe[7047]: ended
Oct 7 19:03:58 localhost /etc/init.d/mysql[7090]: 0 processes alive and '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf ping' resulted in
Oct 7 19:03:58 localhost /etc/init.d/mysql[7090]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Oct 7 19:03:58 localhost /etc/init.d/mysql[7090]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Oct 7 19:03:58 localhost /etc/init.d/mysql[7090]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Oct 7 19:03:58 localhost /etc/init.d/mysql[7090]:
Oct 7 19:05:04 localhost mysqld_safe[7153]: started
Oct 7 19:05:04 localhost mysqld[7156]: 051007 19:05:04 Warning: Can't create test file /var/lib/mysql/ubuntu.lower-test
Oct 7 19:05:04 localhost mysqld[7156]: Warning: One can only use the --user switch if running as root
Oct 7 19:05:04 localhost mysqld[7156]: 051007 19:05:04 Can't start server : Bind on unix socket: Permission denied
Oct 7 19:05:04 localhost mysqld[7156]: 051007 19:05:04 Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
Oct 7 19:05:04 localhost mysqld[7156]: 051007 19:05:04 Aborting
Oct 7 19:05:04 localhost mysqld[7156]:
Oct 7 19:05:04 localhost mysqld[7156]: 051007 19:05:04 /usr/sbin/mysqld: Shutdown Complete
Oct 7 19:05:04 localhost mysqld[7156]:
Oct 7 19:05:04 localhost mysqld_safe[7158]: ended
Oct 7 19:05:10 localhost /etc/init.d/mysql[7200]: 0 processes alive and '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf ping' resulted in
Oct 7 19:05:10 localhost /etc/init.d/mysql[7200]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Oct 7 19:05:10 localhost /etc/init.d/mysql[7200]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Oct 7 19:05:10 localhost /etc/init.d/mysql[7200]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Oct 7 19:05:10 localhost /etc/init.d/mysql[7200]:
Oct 7 19:09:02 localhost /USR/SBIN/CRON[7253]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Oct 7 19:17:01 localhost /USR/SBIN/CRON[7357]: (root) CMD ( run-parts --report /etc/cron.hourly)
If u want more i can post the rest

Last edited by waynejkruse10; 10-07-2005 at 04:25 AM.
 
Old 10-07-2005, 04:30 AM   #6
dylants
Member
 
Registered: Oct 2003
Location: Bath UK
Distribution: RedHat 7,9 RHEL 2.1-4 Suse 9.1, 9.2, Ubuntu, Centos 3-4, Fedora 3-5
Posts: 44

Rep: Reputation: 15
The section

Oct 7 18:44:35 localhost mysqld_safe[6089]: started
Oct 7 18:44:36 localhost mysqld[6092]: 051007 18:44:36 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
Oct 7 18:44:36 localhost mysqld[6092]: 051007 18:44:36 Aborting
Oct 7 18:44:36 localhost mysqld[6092]:
Oct 7 18:44:36 localhost mysqld[6092]: 051007 18:44:36 /usr/sbin/mysqld: Shutdown Complete
Oct 7 18:44:36 localhost mysqld[6092]:
Oct 7 18:44:36 localhost mysqld_safe[6115]: ended

indicates to me that on startup the daemon could not get access to some necessary tables.

Have you done any work recently that involved setting / changing the mysql users permissions?

I would suggest googling for the line "Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist"
 
Old 10-07-2005, 05:13 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
If this was a fresh install / setup, you might not have created the 'standard' database yet.
Code:
su - mysql
mysql_install_db
 
Old 10-31-2005, 07:29 AM   #8
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Question Same error - but in connection with the socket

I had the same problem. I can start the daemon as root and it all works fine. However, when I try to start it as mysql (for security's sake) it immediately closes down again.

I have set the owner and group of the binaries and the /var/lib/mysql to mysql but it does not work. It says it cannot bind on the socket. The socket file does not exist until the daemon starts: I can see this when I start the daemon as root

linux:/usr/sbin # ./mysqld --user=mysql &
[1] 13159
linux:/usr/sbin # 051031 13:20:26 [ERROR] Can't start server : Bind on unix socket: Permission denied
051031 13:20:26 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
051031 13:20:26 [ERROR] Aborting

051031 13:20:26 [Note] ./mysqld: Shutdown complete


[1]+ Exit 1 ./mysqld --user=mysql
linux:/usr/sbin #

This is an extract from my my.cnf file in /etc:

# The MySQL server
[mysqld]
user=mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking

Any suggestions gratefully received.

Cheers

Tim.
 
Old 10-31-2005, 09:16 AM   #9
technick
LQ Newbie
 
Registered: Sep 2005
Location: Atlanta, Ga
Distribution: Dapper Drake
Posts: 10

Rep: Reputation: 0
Have you ran netstat to find out if their's any programs competing for the same port mysql is running on? It's highly unlikely but i've seen folks try to run dual copies of mysql on the same port and it just gets really nasty.

Also check your permissions and make sure the user mysql can read / write everything in the needed directories.
 
Old 11-01-2005, 05:11 AM   #10
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Talking Thanks - I got it working

Thanks for the reply. I got it working in the end.

The problem boiled down to mysql (user) not being able to create the mysql.sock file in the directory specified in my.cnf (var/lib/mysql). This was despite setting owner and group to mysql.

I set the destination of the socket to /tmp and it worked.

my.cnf is now:

[mysqld]
user=mysql
port=3306
socket=/tmp/mysql.sock

among other less relevant lines.

Cheers

Tim.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crontab -e doesnt run my script ! c0nsur Linux - General 4 08-03-2005 11:21 PM
DC++ doesnt run under wine z9_87 Linux - Software 2 05-31-2005 02:07 PM
xmms doesnt run right nick2003 Linux - Software 0 11-15-2003 02:13 PM
mysql.sock doesnt exist radix Slackware 1 10-26-2003 06:11 AM
KDE doesnt run mikster Linux - Newbie 1 08-15-2003 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration