Installing MySQL without root access
Posted
by
vinay
on Super User
See other posts from Super User
or by vinay
Published on 2011-07-16T16:46:18Z
Indexed on
2012/07/11
9:18 UTC
Read the original article
Hit count: 605
I am trying to install MySQL without root permissions. I ran through the following steps:
- Download MySQL Community Server 5.5.8 Linux - Generic Compressed TAR Archive
- Unpack it, for example to:
/home/martin/mysql
Create a
my.cnf
file in your home directory. The file contents should be:[server] user=martin basedir=/home/martin/mysql datadir=/home/martin/sql_data socket=/home/martin/socket port=3666
Go to the
/home/martin/mysql
directory and execute:./scripts/mysql_install_db --defaults-file=~/my.cnf --user=martin --basedir=/home/martin/mysql --datadir=/home/martin/sql_data --socket=/home/martin/socket
Your MySQL server is ready. Start it with this command:
./bin/mysqld_safe --defaults-file=~/my.cnf &
When I try to change the password of MySQL it gives the error:
Cannot connect to mysql server through socket '/tmp/mysql.sock'
How can I change this path and see whether the mysql.sock is created or not?
© Super User or respective owner