Dump MySQL Database/Table Cheat Sheet

Below my own notes based on my experience in dumping mysql Table or database.

Note: If you are not set mysql root password then remove -p argument.

– Dump whole database inside MySQL

bash$ mysqldump -uroot -p --all-databases > alldb.sql

– Dump only specified table of database, the name of database is absentdb and the tables name are employee, timein, absenttbl for instance

bash$ mysqldump -uroot -p absentdb employee timein absenttbl  > severaltbl.sql

– Ignore some table when dumping, the table name must be followed by database name

bash$ mysqldump -uroot -p absentdb --ignore-table=absentdb.employee --ingore-table=absentdb.timein > severaltbl.sql

– Dump schema database only.

bash$ mysqldump -uroot -p absentdb --no-data > schema.sql

Note: This posting will be updated when i get the new one 🙂

Zimbra LAZY Auto Provisioning

When using external authentication we will burden with creating single user in 2 place (in Zimbra and external directory server) for making administrating user more easier there is feature called Auto Provisioning that available since zimbra version 8. this features separated into two kind LAZY and EAGER,

But i preferred using LAZY, a simple explanation for this method

 

When unlisted user in zimbra try to login and in external authentication is successful then zimbra will create user on the fly.

I’m using Active Directory with domain domain.omar.ok , you may replace some configuration below with your environment

zmprov md omar.ok zimbraAutoProvMode LAZY
zmprov md omar.ok zimbraAutoProvAccountNameMap sAMAccountName
zmprov md omar.ok zimbraAutoProvAttrMap sn=displayName
zmprov md omar.ok zimbraAutoProvAuthMech LDAP
zmprov md omar.ok zimbraAutoProvLdapAdminBindDn 'Administrator@domain.omar.ok'
zmprov md omar.ok zimbraAutoProvLdapAdminBindPassword 'Omar123!'
zmprov md omar.ok zimbraAutoProvLdapSearchBase 'CN=Users,DC=domain,DC=omar,DC=ok'
zmprov md omar.ok zimbraAutoProvLdapSearchFilter "(sAMAccountName=%u)"
zmprov md omar.ok zimbraAutoProvLdapURL ldap://192.168.113.10:389

Note: Auto provisioning will never work if you not using external authentication.