Posts

Showing posts from February, 2018

Progress bar: Dump and restore mysql database with progress bar.

Image
Showing progress bar while dumping or restoration of the dump, would be a handy tool. Here is how you do it. You can achieve with  pipe viewer. # apt-get install pv An you may use the pv as shown in the image below to restore the database from a backup file.. # pv database.sql | mysql -u uname -p databasename And to backup the database to a sql file with pv, use the following command. #mysqldump -u username -p databasename | pv -W > database.sql Compress the database file in  gzipped version of the sql file #mysqldump -u username -p databasename | pv -W | gzip > database.sql.gz Restore the gzipped file #pv database.sql.gz | gunzip | mysql -u root -p databasename

Phpmyadmin root login: Can't login to phpmyadmin with 'root' user. Here is the solution!

Upon installation of phpmyadmin, you can login with user 'phpmyadmin' (default user), however if you want to login as root user then you have to re-configure the phpmyadmin. Do as follows to re-configure. Run the commant to reconfigure:        $sudo dpkg-reconfigure phpmyadmin Now you will be asked series of question, do as follows: Hit : <Ok> Reinstall database for phpmyadmin: <Yes> Connection method for MySQL database server for phpmyadmin: TCP/IP Host name of the MySQL database server for phpmyadmin: localhost Port number for the MySQL service: 3306 MySQL database name for phpmyadmin: phpmyadmin Hit : <Ok> MySQL username for phpmyadmin: root MySQL application password for phpmyadmin: your_password_here Password confirmation:  your_password_here Name of the database's administrative user: root Web server to reconfigure automatically: apache2 An error occurred while installing the database: ignore And you are done! Now you can logi