Sunday, September 13, 2020

How to AutoBackup MySQL on Ubuntu/Debian

Here is an utility program called "automysqlbackup" that is available in the Ubuntu repositories.

sudo apt-get install automysqlbackup

Run the command by typing:

sudo automysqlbackup
/etc/lib/automysqlbackup ls
daily  monthly weekly
/etc/lib/automysqlbackup/daily ls
koha_library test

Saturday, September 12, 2020

Reset MySQL Root Password on Ubuntu 16.04 / 17.10 and 18.04/20.04 LTS

sudo /etc/init.d/mysql stop

sudo mkdir /var/run/mysqld/

sudo chown mysql /var/run/mysqld/

sudo mysqld_safe --skip-grant-tables &

=======

You may promnt something like this… you may have to press the Enter keykoha@ubuntu:~mysqld_safe Logging to syslog.

2017-12-25T16:49:30.554646Z mysqld_safe Logging to '/var/log/mysql/error.log'.

2017-12-25T16:49:30.578079Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

2017-12-25T16:49:32.568746Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended


[1]+  Done                    sudo mysqld_safe --skip-grant-tables

=======

sudo mysql -u root

use mysql;

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed


update user set authentication_string=PASSWORD("Newpassword")

where User='root';

flush privileges;
exit
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
Take Koha backup
Access mysql -h 127.0.0.1 -P 3306 -u root -p
Backup of Koha_library
mysqldump -u root -p koha_library > koha_library.sql

Friday, April 24, 2020

Setting up the Z39.50 and SRU Server for KOHA

open terminal in Ubuntu or Debian

koha-z3950-responder --enable <instancename> for example library

Start the server with:
koha-z3950-responder --start <instancename>

if any error occurred , download z3950_responder.pl from below


copy this file into  /usr/share/koha/lib/misc/z3950_responder.pl 

if the misc is not available in lib directory then create new directory and copy             z3950_responder.pl in it.

then issue the command koha-z3950-responder --start <instancename>

your z39.50 responder will start.

The default port is 2100 (if you need to change, follow the given instruction)

Modify config.xml ie.g. to change the listening port from the default (2100). pqf.properties defines rules for translating the incoming Z39.50 queries, and may need to be customized for any custom search fields.



Monday, March 9, 2020

Set Time/Date/Timezone in Ubuntu Linux

Set date from the command line
date +%Y%m%d -s "20120418"
 
Set time from the command line
date +%T -s "11:14:00"
 
Set time and date from the command line
date -s "19 APR 2012 11:14:00"
 
Linux check date from command line
date
 
Will show you something like this:

Thu Apr 19 15:17:34 BOT 2012
 
Set hardware clock


hwclock --show
 
Will output something like this:

Thu 19 Apr 2012 03:23:05 PM BOT  -0.785086 seconds
Now check the system clock

date
Will output something like this:

Thu Apr 19 15:26:41 BOT 2012
Let's set the hardware clock to local time:

hwclock --set --date="2012-04-19 16:45:05" --localtime
If you want to set it to UTC time use:

hwclock --set --date="2011-04-19 20:45:05"  --utc
 
Reference: https://www.garron.me/en/linux/set-time-date-timezone-ntp-linux-shell-gnome-command-line.html   

Wednesday, February 19, 2020

Reset forgot or lost of Subjectsplus admin password

Accidentally you have lost your Subjectspus password or isn't working for you, you can try resetting the password via PHPMyAdmin or your favorite tool for interacting with the MySQL database:

use bellow command:

Go to phpmyadmin

browse table named: Staff | Go to Edit and Past the bellow line in SQL


UPDATE staff SET password = md5("yourpassword") WHERE email = 'your-EmailID'


Hope this works.

How to migrate Linux Dspace to Window 10

Take a backup of Dspace database and folder s Assume the version is same with both OS [I have tested DSpace 6.3] sudo su mkdir dspace_backup...