Logo
  • Home
  • About
  • Services
  • Career
  • Blogs
  • Contact
Logo

The UK's #1 Software Development Company. PodTech IO builds custom software solutions for businesses. Call today for a free consultation

  • Address

    4th Floor, 4 Tabernacle Street London EC2A 4LU
  • Email

    info@podtech.com
  • Contact

    +44 (0) 20 8720 6583

Category Archives: MYSQL

  • Home
  • Category Archives

Count tables MYSQL

  • By podtech
  • In MYSQL

Count tables within a DB, nice and easy.. use db_name; select count(*) from information_schema.tables where table_schema = database();    

Read More

Group data in MySQL every N hours

  • By podtech
  • In MYSQL

Group data in MySQL every N hours Using the hour to aggregate.. in this example every 3 hours. select * from tbl_sometable group by floor(hour(time) / 3);    

Read More

MYSQL Dump Single Table

  • By podtech
  • In MYSQL

Dumping Single MYSQL Table mysqldump db_name table_name > table_name.sql mysqldump -u -h -p db_name table_name > table_name.sql mysqldump -u -h -p db_name table_name –events –triggers –routines > table_name.sql    

Read More

Extract Table from SQL Dump – MYSQL

  • By podtech
  • In MYSQL UNIX

Extract Table from SQL Dump – MYSQL The script below creates individual table exports from a SQL dump. ./MyDumpSplitter.sh yourfile.sql your_table_name [code] #!/bin/sh # http://kedar.nitty-witty.com #SPLIT DUMP FILE INTO INDIVIDUAL TABLE DUMPS # Text color variables txtund=$(tput sgr 0 1)    # Underline txtbld=$(tput bold)       # Bold txtred=$(tput setaf 1)    # Red txtgrn=$(tput setaf 2)    # […]

Read More

MYSQL Event Scheduler – Auto Enable

  • By podtech
  • In MYSQL

MYSQL Event Scheduler – Auto Enable If you are finding the MYSQL event scheduler is disabled everytime you start MYSQL, use the following my.cnf or mysql.ini settings; event_scheduler=on     That Simple!!  

Read More

Reset MYSQL root password – Linux

  • By podtech
  • In MYSQL

Reset MYSQL root password – Linux Log on to your Linux machine as the root user. The steps involved in resetting the MySQL root password are to stop the MySQL server, restart it without the permissions active so you can log into MySQL as root without a password, set a new password, and then restart […]

Read More

SQL Where values are not in another table

  • By podtech
  • In MYSQL SQL

SQL Where values are not in another table [sql] select TCode from Tracking where not exists (select * from Task where Task.TCode = Tracking.TCode ) [/sql]

Read More

Select next available ID

  • By podtech
  • In MYSQL

Select next available ID ## Select the next available UID ## Do not delete users from unixuid and unix gid as there id’s may get re-used ######################################## [sql] SELECT min( r1.uid ) +1 AS next_available_uid FROM unixuid AS r1 LEFT OUTER JOIN unixuid AS r2 ON r2.uid = r1.uid +1 WHERE r1.uid >200 AND r2.uid […]

Read More

MYSQL – Replication

  • By podtech
  • In MYSQL

MYSQL – Replication Login to your mysql server: mysql -uBla -p Some useful commands SHOW SLAVE STATUS; SHOW MASTER STATUS; SHOW PROCESSLIST ; SHOW SLAVE HOSTS;

Read More

Recent Posts

  • DevOps as a Software Development Methodology
  • How Does Spiral Software Development Methodology Work?
  • Waterfall Software Development Methodology And When To Use It
  • What Exactly Is Lean Software Development Methodology?
  • What is Kanban and How Does It Work?

PodTech IO

The UK's #1 Software Development Company. PodTech IO builds custom software solutions for businesses. Call today for a free consultation

Company

  • About
  • Services
  • Contact
  • Blogs
  • Career

Terms

  • Terms & Conditions
  • Privacy Policy

Contact Us

  • ADDRESS

    Headquarter: Tabernacle Street London India: Vi john Tower, Gurgaon, Haryana
  • EMAIL

    info@podtech.com
  • CONTACT

    +44 (0) 20 8720 6583

Copyright ©2023 PodTech IO. All Rights Reserved

Logo