- Backup A Single Database
mysqldump -u root -p dbname > dbname.sql
Where:
dbname = is the name of the database to backup
dbname.sql = is the name of the backup file, can also be location of backup file - Restore A Single Database
mysqldump -u root -p dbname < dbname.sql - Backup All Databases
mysqldump -u root -p --all-databases > All-dbname.sql - Restore Single Database from All Database Backup
mysql -u root -p --one-database dbname < All-dbname.sql
Ad_Feed
Saturday, February 28, 2015
MySQL Databases - Commandline Backup and Restore
Tuesday, October 28, 2014
Perl warning Setting locale failed in Ubuntu
Perl Locale Warning.
The warnings could be irritating, especially when installing any application. The warnings are also visible when some commands are run
The warnings look like:
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
and when you run Run locale from the commandline
The warnings could be irritating, especially when installing any application. The warnings are also visible when some commands are run
The warnings look like:
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
and when you run Run locale from the commandline
bonkhi@sparda-coven:$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_NG.UTF-8
LC_TIME=en_NG.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_NG.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_NG.UTF-8
LC_NAME=en_NG.UTF-8
LC_ADDRESS=en_NG.UTF-8
LC_TELEPHONE=en_NG.UTF-8
LC_MEASUREMENT=en_NG.UTF-8
LC_IDENTIFICATION=en_NG.UTF-8
LC_ALL=
To solve this, generate the missing locale
locale-gen en_US.UTF-8
Set the missing locale
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
Friday, October 3, 2014
How do you reset the circuit protection on Yamaha RX-v373?
Yamaha RX-V373 AV receiver's protection circuity is activated when there is fluctuation in power three (3) consecutive times. This protection mode disables the capability to "turn on" the device.
To disable this:
Hold "Info + Tone Control + Straight" for at least five seconds, while still holding, press the "Power" button.
Manually reboot the AVR for normal operation.
To disable this:
Hold "Info + Tone Control + Straight" for at least five seconds, while still holding, press the "Power" button.
Manually reboot the AVR for normal operation.
Wednesday, May 15, 2013
Using Php 5.3 on Cpanel platform
To install applications that require a higher PHP version, create a .htaccess file inside the application directory and specify which version of php you want used.
# Use PHP 5.3
AddType application/x-httpd-php53 .php
# Use PHP 5.3
AddType application/x-httpd-php53 .php
Monday, April 29, 2013
SSH permission issue - failed to add host to known hosts (/home/username/.ssh/known_hosts)
The permission set on the .ssh folder, the private keys and public keys matter. To solve the problem of -
Failed to add the host to the list of known hosts (/home/username/.ssh/known_hosts)
.ssh folder - permission set to 700
public keys (id_rsa.pub or id_dsa.pub)- permission set to 644
private keys (id_rsa or id_dsa)- permission set to 600
Failed to add the host to the list of known hosts (/home/username/.ssh/known_hosts)
.ssh folder - permission set to 700
public keys (id_rsa.pub or id_dsa.pub)- permission set to 644
private keys (id_rsa or id_dsa)- permission set to 600
Friday, November 23, 2012
Restore crashed Windows 7 (with no recovery image) after installing Ubuntu
Have you tried dual booting Ubuntu and Windows 7 and windows fails?
Did the Ubuntu installation complete successfully, and grub was properly installed but you still get the blue screen of death when you try booting windows?
Well, this is simple. The answer is with the file type of the windows partition.
I am assuming you have set up Ubuntu and grub is correctly installed. If not, please see https://help.ubuntu.com/community/Boot-Repair#A1st_option_:_get_a_CD_including_Boot-Repair for more information.
To correct this, boot your system to the Linux installation and run in root:
The Id for the windows partition (sda1 & sda2) is 42 which is the code for SFS. Change the file type Id to 7, which corresponds to HPFS/NTFS/exFAT, save and reboot.
fdisk /dev/xxx
In the prompt, type p to print the current partition table
Did the Ubuntu installation complete successfully, and grub was properly installed but you still get the blue screen of death when you try booting windows?
Well, this is simple. The answer is with the file type of the windows partition.
I am assuming you have set up Ubuntu and grub is correctly installed. If not, please see https://help.ubuntu.com/community/Boot-Repair#A1st_option_:_get_a_CD_including_Boot-Repair for more information.
To correct this, boot your system to the Linux installation and run in root:
fdisk -l /dev/xxx
The Id for the windows partition (sda1 & sda2) is 42 which is the code for SFS. Change the file type Id to 7, which corresponds to HPFS/NTFS/exFAT, save and reboot.
fdisk /dev/xxx
In the prompt, type p to print the current partition table
To change the file type, type t in the prompt and enter the partition to change.
In my case, I will enter 1.
For a list of the Hex code list of the file types, enter L in the prompt.
Enter 7 in the prompt, which corresponds to the HPFS/NTFS/exFAT file system.
Repeat the process for the second or third windows partition, and when done enter w in to save.
Reboot your system, and grub will load windows ! ! !
Tuesday, October 18, 2011
Install Solaris, Apache, Mysql & Php (SAMP)
You may be conversant with the terms LAMP and WAMP. This means a stack of applications.
For LAMP = Linux, Apache, Mysql and Php/Perl/Python.
For WAMP = Windows, Apache, Mysql and Php/Perl/Python.
To get your new Solaris 11 installation SAMP ready, we need to install Apache, Mysql and Php.
kilo@kilo:~$ sudo -s
Password:
root@kilo:/home/kilo#
root@kilo:/home/kilo# pkg refresh
root@kilo:/home/kilo# pkg install amp
Packages to install: 12
Create boot environment: No
Services to restart: 1
DOWNLOAD PKGS FILES XFER (MB)
database/mysql-51 3/12 554/729 59.0/75.2
When done, enable the apache and mysql service.
root@kilo:/home/kilo#svcadm enable apache22
root@kilo:/home/kilo#svcadm enable mysql
By default, the mysql root user has no password.
root@kilo:/home/kilo# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>;
We can set the password for the root user in mysql using
If you get the error -
It means that the command mysqladmin is not in the path.
root@kilo:/home/kilo# which mysqladmin
which: no mysqladmin in (/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin)
To solve this, use the full path for the command.
root@kilo:/home/kilo# find / -name mysqladmin
/usr/mysql/5.1/bin/sparcv9/mysqladmin
/usr/mysql/5.1/bin/mysqladmin
/usr/mysql/5.1/bin/mysqladmin -u root password "PASSWORD"
For LAMP = Linux, Apache, Mysql and Php/Perl/Python.
For WAMP = Windows, Apache, Mysql and Php/Perl/Python.
To get your new Solaris 11 installation SAMP ready, we need to install Apache, Mysql and Php.
kilo@kilo:~$ sudo -s
Password:
root@kilo:/home/kilo#
root@kilo:/home/kilo# pkg refresh
root@kilo:/home/kilo# pkg install amp
Packages to install: 12
Create boot environment: No
Services to restart: 1
DOWNLOAD PKGS FILES XFER (MB)
database/mysql-51 3/12 554/729 59.0/75.2
When done, enable the apache and mysql service.
root@kilo:/home/kilo#svcadm enable apache22
root@kilo:/home/kilo#svcadm enable mysql
By default, the mysql root user has no password.
root@kilo:/home/kilo# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>;
We can set the password for the root user in mysql using
root@kilo:/home/kilo#mysqladmin -u root password "PASSWORD"
If you get the error -
bash: mysqladmin: command not found
It means that the command mysqladmin is not in the path.
root@kilo:/home/kilo# which mysqladmin
which: no mysqladmin in (/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin)
To solve this, use the full path for the command.
root@kilo:/home/kilo# find / -name mysqladmin
/usr/mysql/5.1/bin/sparcv9/mysqladmin
/usr/mysql/5.1/bin/mysqladmin
/usr/mysql/5.1/bin/mysqladmin -u root password "PASSWORD"
Subscribe to:
Posts (Atom)