Mysql

Mysql

Set Mysql root password to Null   For empty Mysql password set mysql password to null.   #use mysql; #update user set password=null where User=’root’; #flush privileges;   With above mysql commands you set mysql root password to Null.

Enable Slow Query logs in Mysql   We can enable mysql slow query log by two way: Step 1   # touch /var/log/mysql/mysql-slow.log # chown mysql:mysql /var/log/mysql/mysql-slow.log # mysql -u username -ppassword -e ‘SET GLOBAL slow_query_log=1;’ # mysql -u username -ppassword -e ‘SET GLOBALslow_query_log_file=”/var/log/mysql/mysql-slow.log”;’ # …

Database backup and restore with mysqldump command.   The mysqldump client is backup program. Also it can be use to dump a database or database collection for backup or transfer to another server. It takes backup in .sql format. Syntax: mysqldump -u username -pPassword database_name …

       Manually Sync Two MySQL Databases with mysqldump command Here we see how to sync two mysql databases with Linux mysqldump command.. For testing purpose I created two databases. Database 1 : sunil_test Database 2 : sunil_test1   Database 1: sunil_test   Database 2:  sunil_test1 …

Types of mysql replication and how mysql replication works Types of mysql replication: Replication works based on events written to the binary log are read from master and then processed on the slave.           Statement Based Replication: A replication which is based on propagation …

How To Repair MySQL(Master Slave) Replication   If Mysql replication is not working and we are getting very strange error. Here is solution to repair mysql replication.   Error: To fix above error run below mysql queries:   mysql> STOP SLAVE;   It simply tell …

  How to Setup Mysql Master Slave Replication on Centos and Redhat   Here we will see how to setup Mysql Database Replication. Mysql replication is very useful in terms of fail over solution   Advantages: Hot Stand by Node for Fail Over Can be …

What is indexes in mysql?   A database index is a data structure that improves the speed of operations in a table. A mechanism to locate and access data within a database.   More about index: 1) Speed up data retrieval 2) Speed of selects …

Mysql Database Server Hardening Install SSL certificate to encrypt data across network:   Description: MySQL uses unencrypted connections between the client and the server. All data flowing between the remote client and the remote server must be encrypted as far as possible. Impact: Data Sent …