MySQL

  1. Mysql commands

    Originall from http://webcheatsheet.com/sql/mysql_backup_restore.php but condensed here to just the things I always have to look up

    Some useful commands when doing mysql command line

    $ mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]

    For example, to backup a database named 'Tutorials' with the username 'root' and with no password to a file tut_backup.sql, you should accomplish this command:

    $ mysqldump -u root -p Tutorials > tut_backup.sql
    Read more »
  2. Changing the Order number and Invoice number starting sequence for Magento 2

    Recently I needed to update a Magento 2 store to start Order numbers and Invoice numbers to specific numbers. Its pretty easy, you just need access to the database and run these commands:

    Read more »
  3. Create a mysqldump, restore database and reset root password for MySQL

    How to Import and Export Databases CLI or command line
    Export

    mysqldump -u [username] -p [database name] > [database name].sql

    Import

    mysql -u [username] -p newdatabase < [database name].sql
    Read more »
  4. MySQL result set for MIN and MAX that do not equal one another

    I needed to get a mysql query where the MIN and MAX were set, but I could exclude any that the same.  I struggled a bit to figure out the proper syntax but my friend Tom B. from Gallup helped me out ( Thank you sir, that is one digital drop for you! ).  For those of you who may need to get this in the future...or maybe future me in a few weeks after I forget the syntax....here it is:

    Read more »
Russell Albin - Omaha, Nebraska Magento Developer Magento Developer Plus Magento Solutions Specialist Magento Front End Developer https://www.linkedin.com/in/russellalbin