0

OS : Redhat

I try to launch the mysql database after a fresh installation. The problem is I am not root on this server and my user have not the permission to write in the /var/lib folder.

When I try to launch the mysqld, I have passed lot of options to mysqld_safe command line but mysqld always need to write in the /var/lib folder :/

Command line :

bin/mysqld_safe --basedir=/tools/mysql/mysql --log-error=/tools/mysql/mysql/log \
--datadir=/tools/mysql/mysql/data --defaults-file=/tools/mysql/mysql/my.cnf \
 --tmpdir=/tools/mysql/mysql/tmp

error log :

130918 16:43:23 mysqld_safe Logging to '/tools/mysql/mysql/log.err'.
mkdir: cannot create directory `/var/lib/mysql': Permission denied
chown: invalid user: `mysql'
chmod: cannot access `/var/lib/mysql': No such file or directory*
130918 16:43:23 mysqld_safe Starting mysqld daemon with databases from /tools/mysql/mysql/data
130918 16:43:25 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Anyone know how can I ask to mysqld to do not write in the /var/lib directory ?

1
  • Invalid user: mysql does not sound good. This rather looks like the mysql-user does not exist. How was mysql installed on that server?
    – Nils
    Sep 18, 2013 at 21:05

1 Answer 1

1

It's probably the Unix socket, which defaults to /var/lib/mysql/mysql.sock. Try adding --socket=/tools/mysql/mysql/mysql.sock (or wherever you want to put it). You'll need to use the same option with the client.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .