I want to install mySQL on CentOS.
I do not have a root account on that machine.
How can I install mySQL on CentOS as a user, ie. without being root?
|
|
|
For RPM packages (and CentOS is certainly a RPM system) you need to be root to run the rpm installer. The RPM installer needs to write to some package tracking dbs, and you need to be root to write to them. OK, well, mysql allows you to install from a tarball, right? (http://dev.mysql.com/doc/refman/5.0/en/binary-installation.html). Well, yeah, but there's a postinstall that you'll need to run, that you'll need to be root to do. RPMs can have pre-and postinstall steps outside of just dumping out files. these can be changing configuration files, adding/deleting users. In general you may need to be root to do these. Even without scripts, you generally install into directories that only root can install to. In another comment, you mention other packages that you've installed that you didn't need to be root. For these packages I'm sure that:
|
|||
|
|
|
INSTALLING MYSQL ON CENTOS WITHOUT ROOT ACCOUNT:
|
||||
|
You can build it and run it from your home directory if you have a compiler available, but in order to install software on linux, you will require root access. |
|||
|
|
Martin's answer worked for me. To address the comments (I can't comment due to permissions here): To connect to the server, you either need to add the /home/martin/mysql/bin directory (/home/martin/mysql/bin in the example) to your path, or use the full path name to run it:
The other missing piece was setting the root password. After doing the bin/mysqld_safe step (see step 5 in Martin's response), MySql told me how to set the root password. You need to do that step, but adding the --socket=/home/martin/socket option to the command line. |
|||
|
|