Thanks to antville.org
Backup mysql data using innobackup

BACKUP

innobackupex --user=USERNAME --password=PASSWORD --no-timestamp /data/backups/new_backup <--(PATH OF BACKUP)
innobackupex --apply-log /data/backups/new_backup

RESTORE

service mysql stop
mkdir /tmp/mysql
mv /var/lib/mysql/* /tmp/mysql/
innobackupex --copy-back /data/backups/new_backup <--(PATH OF BACKUP WHERE IS STORED)
chown -R mysql: /var/lib/mysql
service mysql start

... Link (0 comments) ... Comment


Tuning MySQL

Getting the shell script:
wget launchpadlibrarian.net

Running:
sh tuning-primer.sh

... Link (0 comments) ... Comment


download Enterprise backup

1) Access My Oracle Support.
2) Click on Patches & Updates navigation tab near the top of the screen.
3) In the Patch Search section, click on the Product or Family (Advanced Search) link
4) Type MySQL Enterprise Backup into the Product drop down list
5) select the latest release
6) Click the Search button.

... Link (0 comments) ... Comment


disable innodb

The MySQL server can still be started without InnoDB in 5.6 using the following options

skip-innodb
default-storage-engine=myisam
default-tmp-storage-engine=myisam

... Link (0 comments) ... Comment


Why not blog or text columns?

BLOB/TEXT columns are stored in an external hidden table. First 256B are stored inline in main table. Reading a BLOB/TEXT requires two reads. One for reading the Main table + reading from hidden table.

... Link (0 comments) ... Comment


Percona xtrabackup commands

/ Tar-compatible file
innobackupex-1.5.1 --stream=tar ./ > backup.tar

/ Compress
innobackupex-1.5.1 --stream=tar ./ | gzip - > backup.tar.gz

/ Copy to remote host
innobackupex-1.5.1 --stream=tar ./ | ssh vadim@desthost "cat - > /data/vol1/mysqluc/backup.tar“

/ set up slave
innobackupex-1.5.1 --stream=tar /tmp/ --slave-info | ssh user@DESTSERVER "tar xfi - -C /DESTDIR“

innobackupex-1.5.1 --apply-log --use-memory=2G /DESTDIR

... Link (0 comments) ... Comment


Innodb Monitor table

Monitor table is a way of communicating directly to the InnoDB storage engine by creating a table of a special name.
Additional debugging information is then written to MySQL’s error log. For example:

CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;

/ view to the error log /

DROP TABLE innodb_monitor;

... Link (0 comments) ... Comment


Starting mysql

When you have installed mysql from source, you will need to change the directory to the source installation and then start the mysql in safe mode.

cd /usr/local/mysql/

./bin/mysqld_safe

If the socket file location is chantged in the my.cnf then you will need to provide it while logging into mysql.

/usr/local/mysql/bin/mysql --socket=/var/lib/mysql/mysql.sock

... Link (0 comments) ... Comment


mysql troubleshooting

The following information is required to analyse any mysql issue

  1. my.cnf configuration file
  2. mysql error log
  3. Output of SQL commands:

show global variables;
show global status;
show /!50101 engine / innodb status\G

  1. Output of shell commands in file /tmp/linux_output.txt:
    top -b -n 1 >> /tmp/linux_output.txt
    mount -v >> /tmp/linux_output.txt
    df -h >> /tmp/linux_output.txt
    egrep -i "err|fault|mysql" /var/log/* >> /tmp/linux_output.txt

... Link (0 comments) ... Comment


Killing mysql

Here are a few ways to kill mysql process.

mysqladmin shutdown
kill -TERM nnnn
killalll mysqld
kill -TERM pidof mysqld
kill -TERM cat /var/run/mysqld.pid

... Link (0 comments) ... Comment


Online for 6561 days
Last modified: 4/12/20 2:01 PM
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
August 2020
SunMonTueWedThuFriSat
1
2345678
9101112131415
16171819202122
23242526272829
3031
April
Recent updates
important leafy vegetables 1. Amaranthus
caudatus: rajgira. 2. Amaranthus tricolor: Math.  (Chhoti Chulai- Hindi, Cheera-...
by shantanuo (4/12/20 2:01 PM)
program creek program creek
seems to be a good site for handy references of python...
by shantanuo (4/11/20 11:24 AM)
Standard out to a file
This code will change the standard out to a file...
by shantanuo (4/11/20 11:18 AM)
Create config file for AWS
command line tool While creating amazon config file in a...
by shantanuo (2/20/20 6:00 AM)
setting colors in pandas This
is how to set the colors in pandas mapper =...
by shantanuo (2/20/20 5:53 AM)
log mysql output tee output.txt
show global variables; show engine innodb status\G show full processlist;...
by shantanuo (2/19/20 10:33 AM)
access AWS API gateway using
python Amazon API gateway allows us to host server-less API's...
by shantanuo (2/16/20 9:41 AM)
Using boto In the bad
old days, the glacier class used to have different layers....
by shantanuo (2/15/20 10:28 AM)
backup mysql users  3
steps to install perconal utility... yum install perl-DBI perl-Data-Dumper perl-DBD-MySQL wget...
by shantanuo (2/13/20 1:49 PM)
Steps to be used for
generating AWS API gateway a) Method Execution - Get Method...
by shantanuo (2/13/20 1:30 PM)
apply colors to pandas Here
is how to change the color of negative values to...
by shantanuo (2/12/20 8:57 AM)
Holidays in India These are
the common holidays celebrated in India (Mumbai) during 2016 -...
by shantanuo (2/11/20 1:53 PM)
change log file size in
MySQL Here are the steps to be followed while changing...
by shantanuo (2/11/20 10:38 AM)
MySQL common error messages 1146
Table does not exist 1054 column does not exist 1062...
by shantanuo (2/11/20 10:13 AM)
ipython parallel demo First start
ipython in cluster mode ipcluster start -n 4 from IPython.parallel...
by shantanuo (2/9/20 9:02 AM)
djanog settings You may see
this message if you have DEBUG = True in your...
by shantanuo (2/9/20 4:07 AM)
clear tmp folder Here is
following commands to clear unwanted stuff from the /tmp partition...
by shantanuo (2/8/20 2:41 PM)
change your server time to
IST If you need to change your server clock to...
by shantanuo (2/8/20 2:39 PM)
Transfer root emails to another
email address If you have root access to the server...
by shantanuo (2/8/20 2:32 PM)
special strings in cron Instead
of the first five fields, you can use any one...
by shantanuo (2/8/20 2:30 PM)
LibreOffice version conflict I am
not able to install latest version of Libre office. I...
by shantanuo (1/29/20 9:15 AM)
while loop This is
a sample shell script while loop while read mydb do echo...
by shantanuo (1/26/20 12:24 PM)
compare mysql schema And here
is poor man's schema compare using good old diff command......
by shantanuo (1/26/20 11:49 AM)
Selecting from error log grep
"error" error_log |awk -F[ {'print $4'} \ | sort |...
by shantanuo (1/26/20 10:40 AM)
Rank mysql records using variables
SET @rank = 0, @prev_val = NULL; SELECT rank, correct...
by shantanuo (1/26/20 9:45 AM)

RSS feed

Made with Antville
Helma Object Publisher