How to create user to taking backup only in mySQL ? MySQL

mysql-tutorials

Is there simple command available to give limited access the user to take backup the database in mySQL WorkBench with limited access. Step : 1 CREATE USER ‘username’@’%’ IDENTIFIED BY ‘pa$$w0rd’; Step : 2 GRANT SELECT, SHOW VIEW, LOCK TABLES, RELOAD, REPLICATION CLIENT ON *.* TO ‘userName’@’%’; Step: 3 FLUSH PRIVILEGES; The users not required INSERT or ALTER TABLE privileges to take backup te database. The above set of privileges enough to take the backup from the mysqldump programs. And it will be sufficient to backup database also.  

Read More

myTop – mySQL – Database – Performance Monitoring Tool

mysql-tutorials

myTop is one of free open source code to monitor mySQL Database in CUI mode. The terminal window show the statistics information about threads queries, uptime and more etc.., The tool helps to optimize and improve performance of mySQL to handle large request and response in the database server. How to install myTOP in Ubuntu ? sudo apt install mytop Configuring myTOP sudo nano /root/.mytop Copy and paste the default settings. host=localhost db=mysql delay=3 port=3306 socket= batchmode=0 color=1 idle=0 Connecting to myTOP :- sudo mytop -u <<USERNAME> –prompt Sample myTOP…

Read More

How to get last one hour data in MySQL ?

Last one Hour data in MySQL ? Example :- select o.code, o.customerId, c.name, c.email from `Order` o’; join Customer c on c.id = o.customerId ‘; where o.orderDate >= DATE_SUB(NOW(),INTERVAL <<SYNTAX>> HOUR) order by o.id limit 0, 2 Example :- select o.code, o.customerId, c.name, c.email from `Order` o’; join Customer c on c.id = o.customerId ‘; where o.orderDate >= DATE_SUB(NOW(),INTERVAL 1 HOUR) order by o.id limit 0, 2

Read More