Ubuntu Server 8.04 Mysql Config Issue

Vlad Vlasceanu vvvlad at gmail.com
Thu Mar 27 03:57:42 UTC 2008


Hello,

I stumbled upon an issue with mysql that I can't figure out for the life 
of me. I installed Ubuntu Server 8.04 with LAMP on a fresh server some 
160Gb disk space with most of the free space on a partition mapped to /home
I'd like to store all the mysql data files under /home/mysql since 
that's where most of the disk space is available. Well, to put it 
simple... it's not working... this is my first ubuntu installation, have 
used gentoo previously.
Mysql version 5.0.51a

I made the usual changes that worked on my previous installations
copy /var/lib/mysql to /home/mysql
chown -R mysql:mysql /home/mysql
updated my.cnf (see below)
tried to start mysqld and it didn't work

The current error i'm receiving is:
---------
[Warning] Can't create test file /home/mysql/arrakis.lower-test
080326 22:48:23 [Warning] Can't create test file 
/home/mysql/arrakis.lower-test
080326 22:48:23 [ERROR] /usr/sbin/mysqld: Can't find file: 
'./mysql/host.frm' (errno: 13)
080326 22:48:23 [ERROR] /usr/sbin/mysqld: Can't find file: 
'./mysql/host.frm' (errno: 13)
080326 22:48:23 [ERROR] Fatal error: Can't open and lock privilege 
tables: Can't find file: './mysql/host.frm' (errno: 13)
---------

needless to say the files are in /home/mysql/mysql  (where i'd expect 
them to be) and owned by mysql

I even tried to run  mysql_install_db --user=mysql, which crashes:
---------
Installing MySQL system tables...
080326 22:51:39 [Warning] Can't create test file 
/home/mysql/arrakis.lower-test
080326 22:51:39 [Warning] Can't create test file 
/home/mysql/arrakis.lower-test
ERROR: 1005  Can't create table 'db' (errno: 13)
080326 22:51:39 [ERROR] Aborting
---------
I also tried to move mysql's data files to /srv/mysql, /foo/bar and so 
on, same results
The only folder where it seems to work is in /var/lib/mysql even if the 
permissions are identical...

Anybody have any ideas? Thanks a million

Vlad

PS:
Below is a copy of my /etc/mysql/my.cnf file:
---------
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
bind-address    = 127.0.0.1
basedir         = /usr
datadir         = /home/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
log-error       = /home/logs/mysql_error.log
skip-external-locking
skip-innodb
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 8
query_cache_limit       = 1M
query_cache_size        = 16M
expire_logs_days        = 10
max_binlog_size         = 128M
character-set-server    = utf8
default-character-set   = utf8
old_passwords           = false
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_data_home_dir    = /home/mysql/
innodb_log_arch_dir     = /home/mysql/
innodb_log_group_home_dir = /home/mysql/
innodb_data_file_path   = ibdata1:16M:autoextend
innodb_log_file_size    = 8M
innodb_log_buffer_size  = 8M
set-variable            = innodb_log_files_in_group=2
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer              = 16M
----------

Here's a ls of the home folder:
----------
vvvlad at arrakis:/etc/mysql# ls -all /home/
total 40
drwxr-xr-x  7 root   root    4096 Mar 26 22:19 .
drwxr-xr-x 21 root   root    4096 Mar 24 21:42 ..
drwxrwxrwx  2 root   root    4096 Mar 26 20:26 logs
drwx------  2 root   root   16384 Mar 24 21:30 lost+found
drwxr-xr-x  3 mysql  mysql   4096 Mar 26 22:19 mysql
drwxr-xr-x  3 root   root    4096 Mar 26 20:32 sites
drwxr-xr-x  2 vvvlad vvvlad  4096 Mar 25 22:31 vvvlad
----------





More information about the ubuntu-users mailing list