July 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

July 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  

Mysql show

mysqlshow is another way to check the database details table and column information, let’s check some of the basic commands

shows available databases # mysqlshow -pmysql

Display all tables in a DB # mysqlshow -pmysql databasename

Display tables along with number of columns in a database # mysqlshow -v -pmysql databasename

Display columns and Rows […]

How to Recover a Mysql Root Password

Let’s check how can we recover mysql root password if we lost it Step # 1: Stop the MySQL server process. Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password. Step # 3: Connect to mysql server as the root user. Step # […]

Mysqladmin Tips

Here we can see some tips with mysqladmin tool To check the status of mysqld # mysqladmin -u root -pmysql ping # service mysqld status # mysqladmin -u root -pmysql status

 

To find mysql version # mysqladmin -u root -pmysql version

 

To view all the MySQL Server status variable and it s current […]

Mysql grant

 

Some mysql grant queries Granting permission for a particular DB only mysql> grant all privileges on databasename.* to ‘username’@’localhost’; mysql> flush privileges;

 

Granting Permission for all the DB mysql> grant all privileges on *.* to ‘username’@’localhost’;

 

Granting Permission from a particular IP # grant all privileges on *.* to ‘username’@’192.168.0.20’;

 

# […]

How to Repair a Mysql Table

Repairing corrupted mysql tables using myisamchk / mysqlcheck / repair 1. myisamchk myisam is the default storage engine for mysql database. There is a chance of myisam tables gets corrupted easily. myisamchk helps to identify and fix corrupted tables in myisam. when table created in mysql it will create different files under mysql some of […]

How to install Mysql with partition enabled

We can check how can we able to setting up mysql server with partition enabled. Lets see what is mysql partition means.

 

A partition is a division of a logical database or its constituting elements into distinct independent parts. Database partitioning is normally done for manageability, performance or availability reasons.

 

A popular and […]

Mysql Performance Tuning

MySQL Performance tuning [my.cnf file parameters + description] [mysqld]# Maximum allowed number of connections to the MySQL Server max_connections = 1500

# The key buffer is a variable that is shared amongst all MySQL clients on the server. A large setting is recomended, particularly helpful with tables that have unique keys. key_buffer = 1024M

#The […]

Monitor Mysql DB in linux

We can monitor mysql queries and database using an utility called MonYog. MONyog is a monitoring and advisory tool for MySQL Community as well as Enterprise versions.MONyog is agent-less, and does not require anything to be installed on the MySQL servers. MONyog helps monitor enterprise database environments.

 

MONyog MySQL Monitor and Advisor MySQL DBAs […]

InnoDB vs MyISAM

MyISAM and InnoDB are the two most-common database engines available. While installing the DB most of them don’t even take the time to select a storage-engine and just accept the database default. The storage-engine is what which store, handle, and retrieve information for a particular table. 1. MyISAM It is the default engine with MySQL. […]

mysqlhotcopy vs mysqldump

mysqlhotcopy vs mysqldump mysqlhotcopy is a Perl script that was originally written and contributed by Tim Bunce. It uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a database backup quickly. It is the fastest way to make a backup of the database or single tables, but it can be run only on […]