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 key…koha@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