MySQL calculate gender percentage

Query to calculate gender percentage in MySQL

Advertisements

Using MySQL Utilities Workbench Script mysqldbcompare To Compare Two Databases In Replication

Scripting MySQL

In my last two posts, I wrote about setting up replication with MySQL 5.6 using Global Transaction Identifiers. Even when I set up replication “the old-fashioned way“, one thought always enters my mind – did all of the data copy over to the slave? And, even after the master/slave has been running for a while, I am always wondering if the data in the slave matches the master. Or did the change that I made to that table make it over to the slave? It is probably more of a case of paranoia on my part, as MySQL replication is very reliable and works really well.

A few months ago, I started writing about the MySQL Utilities. If you haven’t heard about the MySQL Utilities:

“MySQL Utilities is a package of utilities that are used for maintenance and administration of MySQL servers. These utilities encapsulate a set…

View original post 1,578 more words

How to Import/Export databases in MySQL from command-line

Recently i worked with MySQL import/export databases and i have found some useful commands below: Export: All databases into sql file using mysqldump tool Single database into sql file using mysqldump tool Single database table into sql file using mysqldump tool Import: Database from sql dump or Single database from the dump(if it contains multiple … Continue reading How to Import/Export databases in MySQL from command-line