douglegge
March 1st, 2010, 03:29 PM
Relative newcomer to Linux I have been attempting to install mysql 5.1 onto Ubuntu 9.10.
The commands for the binary distro state:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
# Replaced gunzip command with tar command below with additional –xvzf switch
shell > tar -xvzf /usr/local/ mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
# script below run as scripts/mysql_install_db --user=mysql –no-defaults to avoid error message. See http://www.bitbybit.dk/carsten/blog/?p=117 for more detail
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
But am failing at the last hurdle as I cannot get the server to start. I’m guessing it’s a permissions issue, the error message displayed is:
root@lab05:/usr/local/mysql# bin/mysqld_safe --user=mysql &
[1] 5619
root@lab05:/usr/local/mysql# 100301 14:23:12 mysqld_safe Logging to '/var/lib/mysql/lab05.err'.
touch: cannot touch `/var/lib/mysql/lab05.err': No such file or directory
chown: cannot access `/var/lib/mysql/lab05.err': No such file or directory
100301 14:23:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
bin/mysqld_safe: 563: cannot create /var/lib/mysql/lab05.err: Directory nonexistent
eval: 1: cannot create /var/lib/mysql/lab05.err: Directory nonexistent
100301 14:23:12 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
bin/mysqld_safe: 607: cannot create /var/lib/mysql/lab05.err: Directory nonexistent
[1]+ Exit 2 bin/mysqld_safe --user=mysql
I don’t appear to have mysql folder in /var/lib:
root@lab05:/var/lib# ls
acpi-support dbus hp os-prober synaptic
alsa defoma initramfs-tools pam ucf
apparmor DeviceKit-disks initscripts pm-utils update-manager
apt DeviceKit-power insserv polkit-1 update-notifier
aptitude dhcp3 libuuid pulseaudio update-rc.d
apt-xapian-index dictionaries-common locales pycentral urandom
aspell doc-base logrotate python-support vim
avahi-autoipd dpkg misc samba x11
belocs gconf mlocate sgml-base xkb
binfmts gdm NetworkManager snmp xml-core
computer-janitor hal openoffice sreadahead
Any help gratefully received
Doug
The commands for the binary distro state:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
# Replaced gunzip command with tar command below with additional –xvzf switch
shell > tar -xvzf /usr/local/ mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
# script below run as scripts/mysql_install_db --user=mysql –no-defaults to avoid error message. See http://www.bitbybit.dk/carsten/blog/?p=117 for more detail
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
But am failing at the last hurdle as I cannot get the server to start. I’m guessing it’s a permissions issue, the error message displayed is:
root@lab05:/usr/local/mysql# bin/mysqld_safe --user=mysql &
[1] 5619
root@lab05:/usr/local/mysql# 100301 14:23:12 mysqld_safe Logging to '/var/lib/mysql/lab05.err'.
touch: cannot touch `/var/lib/mysql/lab05.err': No such file or directory
chown: cannot access `/var/lib/mysql/lab05.err': No such file or directory
100301 14:23:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
bin/mysqld_safe: 563: cannot create /var/lib/mysql/lab05.err: Directory nonexistent
eval: 1: cannot create /var/lib/mysql/lab05.err: Directory nonexistent
100301 14:23:12 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
bin/mysqld_safe: 607: cannot create /var/lib/mysql/lab05.err: Directory nonexistent
[1]+ Exit 2 bin/mysqld_safe --user=mysql
I don’t appear to have mysql folder in /var/lib:
root@lab05:/var/lib# ls
acpi-support dbus hp os-prober synaptic
alsa defoma initramfs-tools pam ucf
apparmor DeviceKit-disks initscripts pm-utils update-manager
apt DeviceKit-power insserv polkit-1 update-notifier
aptitude dhcp3 libuuid pulseaudio update-rc.d
apt-xapian-index dictionaries-common locales pycentral urandom
aspell doc-base logrotate python-support vim
avahi-autoipd dpkg misc samba x11
belocs gconf mlocate sgml-base xkb
binfmts gdm NetworkManager snmp xml-core
computer-janitor hal openoffice sreadahead
Any help gratefully received
Doug