PDA

View Full Version : [ubuntu] mysql 5.1 install on Ubuntu 9.10



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

stephaneeybert
January 29th, 2012, 11:02 AM
Adding my little weight to it.. I have the same error.

stephane-ThinkPad-X60 stephane # 120129 10:59:56 mysqld_safe Logging to '/var/lib/mysql/stephane-ThinkPad-X60.err'.
touch: cannot touch `/var/lib/mysql/stephane-ThinkPad-X60.err': No such file or directory
chown: cannot access `/var/lib/mysql/stephane-ThinkPad-X60.err': No such file or directory
120129 10:59:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
./bin/mysqld_safe: 568: cannot create /var/lib/mysql/stephane-ThinkPad-X60.err: Directory nonexistent
eval: 1: cannot create /var/lib/mysql/stephane-ThinkPad-X60.err: Directory nonexistent
120129 10:59:56 mysqld_safe mysqld from pid file /var/lib/mysql/stephane-ThinkPad-X60.pid ended
./bin/mysqld_safe: 612: cannot create /var/lib/mysql/stephane-ThinkPad-X60.err: Directory nonexistent

douglegge
January 29th, 2012, 12:29 PM
I think I managed to solve this one, but can't remeber of the top of my head how. Give me a couple of days to go through some old notes and I'll get back to you

Doug

stephaneeybert
January 29th, 2012, 01:25 PM
I just solved it by specifying some options in the my.cnf file:

user = stephane
basedir=/home/stephane/programs/mysql
datadir=/home/stephane/programs/mysql/data
log_error = /home/stephane/programs/install/var/stephane-ThinkPad-X60.err

In our case, the log error directive solved my issue.