Skip to content

DBMS installation from source and management

Primal Pappachan edited this page Jun 24, 2020 · 1 revision

PostgreSQL

Connect to DBMS

./psql --port=5433 -U primal postgres

Start the DBMS server

/home/primal/postgres/bin/pg_ctl -o "-F -p 5433" -D /home/primal/postgres/data/ -l logfile start

Installation

Follow instructions from here https://www.endpoint.com/blog/2013/06/12/installing-postgresql-without-root

If bison is missing download the binary and install it https://linuxreference.wordpress.com/2019/06/08/howto-install-bison-source-code-on-ubuntu-18-04/

To configure bison installation within home directory

 ./configure --prefix=$HOME/bison3.6

Add to path

Edit $HOME/.bashrc file and add this line

export PATH=$PATH:$HOME/bison3.6/bin

MySQL

To start the mysql server

/home/primal/mysql/bin/mysqld --user=root --datadir=/home/primal/mysql/data --basedir=home/primal/mysql --log-error=/home/primal/mysql/log/mysql.err --pid-file=/home/primal/mysql/mysql.pid --socket=/home/primal/mysql/socket --port=3307

To shutdown mysql server

/home/primal/mysql/bin/mysqladmin --socket=/home/primal/mysql/socket --port=3307 shutdown -u root -p

Overriding secure-file-priv

/home/primal/mysql/bin/mysqld --user=root --datadir=/home/primal/mysql/data --basedir=home/primal/mysql --log-error=/home/primal/mysql/log/mysql.err --pid-file=/home/primal/mysql/mysql.pid --socket=/home/primal/mysql/socket --port=3307 --secure-file-priv=/home/primal/export

To login to the server

mysql -u root --port=3307  --socket=/home/primal/mysql/socket -p

Enter the temporary password

Change the password by

Alter user root@localhost identified 'new_password'

Installation

Follow instructions from here https://dzone.com/articles/setting-up-mysql-without-root-access