Select Database -> Create Database(Ctrl+D) or use the Object Browser context menu to create a new database. Enter the Database name and click Create button. The created database gets currently selected. The charset and collation options lets you define the default charset and collation for a database. Tables created in the database will be created with the selected charset and collation unless otherwise specified.
Alter Databse
This option lets you change the default charset and collation for a database. New tables created after that will be created with the selected charset and collation unless otherwise specified. Default settings for existing tables and data stored in existing columns are not affected by this. It changes only defaults for the database and as such has only effect for future tables and data.
How to invoke the dialogue: Select Database -> Alter Database (or press F6 or use Database context menu) to alter database.
Copy DB To Different Host/DB
Select the Database you want to copy and then Select Database -> Copy Database to different Host/DB to copy a database (with all or selected items of its table structure as well as the data) to another database (which may be located in another host).
In Copy Database dialog box, first select the object(s) like tables, views, stored procedures, functions, triggers and events to be copied from the source database. You may Select All/Deselect All by clicking on tree node check boxes to select the object(s) quickly. Now you can create a database in the target by simply typing the Database name or you can select the target database from the drop down where you want to copy the data.
Click Drop If Exists In Target to first delete the named object(s) in the destination database before copying them from the source database.
Click Ignore DEFINNER to Ignore the DEFINER clause for database objects. Note that the target server will then create DEFINER as current SmartMYSQL user when creating the object.
Click Structure Only to copy the selected object(s) with no rows (the destination table is empty) or click Structure And Data to copy the object(s) along with its data in the destination database.
Click Copy associated triggers to copy associated triggers of selected tables from objects tab. If Copy associated triggers is checked associated triggers can be added or removed by just selecting or unchecking the tables.
Select Database -> More Database Operations -> Empty Database to drop all the tables and other type of objects (Stored Procedures, Views etc.) of a Database. However the Database itself is not dropped – it remains as an ’empty shell’ only. This is practical for import of a SQL Dump with no CREATE DATABASE statement and no USE statement.
Drop Database
Select Database -> More Database Operations -> Drop Database (Del) to drop the active database along with all associated data objects.
Truncate Database
Select Database -> More Database Operations -> Truncate Database (Shift+Del) to truncate (make the tables empty) all the tables of a database (however, the Tables and other objects (Stored Procedures, Views etc.) are not dropped).
Create Schema of Database
Select Database -> Create Schema For Database in HTML (Ctrl+Shift+Alt+S). This is useful for documentation of database as you may print the schema nicely with appropriate page breaks, formatting etc.
Select the Tables for which Schema to be created. You may use Select All/Unselect All buttons to create the Tables quickly. Click Create button. You get the file dialogue box to specify the filename to store the generated schema.
Sample HTML Schema
Execute SQL Script
SmartMYSQL allows you to execute a batch file of any size (yes….any size – limited by the OS) created using mysqldump or SmartMYSQL’s Export Database As Batch Script option. Select Tools -> Execute SQL Script (Ctrl+Shift+Q). Select the file and press Execute. If SmartMYSQL encounters an error it stops further execution and logs the query as well as the error message in SmartMYSQL.err located in the SmartMYSQL installation folder.
SmartMYSQL provides Import External Data to streamline the transfer of data from any ODBC compliant data source to MySQL. To Import data from any ODBC compliant data source, select Powertools -> Import External Data or press Ctrl+Alt+O.
The import mechanism provides powerful and effective features, such as:
Import External Data requires an appropriate ODBC-driver (matching the data source) installed on the system where SmartMYSQL is running. There are two ways how SmartMYSQL can use such driver:
This option is available from Powertools -> Scheduled Backups (or) right click on database->Backup/Export->Scheduled Backups (or press Ctrl+ALT+S)
SmartMYSQL’s Scheduled Backup Wizard allows you to schedule Exporting of Data as SQL Dumps. You can use this wizard to export data into a single file or as multiple files.
Starting Scheduled Database Backups
Startup Scheduled Backup Wizard found in the Powertools menu or use keyboard shortcut Ctrl+Alt+S to start the tool. The first screen you will get is:
This page allows you to start up a backup session or to edit an existing session.
Select Start a new Session and click Next to start a new backup session.
In this page you need to provide details about your MySQL database.
There are also are two different options to backup ALL databases (but it will of course only backup the databases that this user can access on the server). One of those options includes the `mysql` database and the other does not. You should be careful about backing up and restoring the `mysql` database unless you are the server administrator. For most users best option is to backup ‘ALL user data’ (without `mysql` database). Note that both ALL options will not back up the Information_Schema database and Performance_Schema. These databases are read-only databases and cannot be restored. However , if you want, you may select it individually for export.
Note that it’s not required to have SmartMYSQL currently connected to any database to execute the operation. The session establishes all required connections during the operation execution.
Selecting object(s) that you want to export
In this page, you choose whether you want to create backup of all the objects or selected object(s).
Select Export All Objects to export all the objects. If you want to export only selected object(s) then select Export Selected Object(s) and select the corresponding object(s) in the list box.
Here in the dialog box, first select the object(s) like tables, views, stored procs, functions, triggers and events to be copied from the source database. You may Select All / Deselect All by clicking on tree node checkboxes to select the object(s) quickly.
How do you want to generate the script
SmartMYSQL allows you make a complete dump in one single dump file or across separate files in a directory. If you choose to export to separate files then SmartMYSQL will generate obj_{objectname}.sql in the folder specified.
Select the option and provide the corresponding File name or Folder name accordingly.
You can even tell SmartMYSQL to prefix the specified file name with the current timestamp and configure it to overwrite or append to existing script files.
Compress backup files: When this option is checked SmartMYSQL will create a zip-archive of the backup.
Options
The next two pages of the wizard allow you to set various options for the backup process. SmartMYSQL provides you with maximum flexibility and options to generate scripts as you want.
Structure and Data: Select this option if you want to backup both structure and data information for a table.
Structure Only: Select this option if you want to backup only structure information for a table.
DDL Options:
— Include “CREATE database” statement: Select this option if you want to add a “Create database” statement in the output.
— Include “USE database” statement: Select this option if you want to add “Use database” statement in the output.
— Include “DROP” statement: Select this option if you want to add “Drop Object(s)” statement in the output.
— Ignore Definer: It is an option to Ignore DEFINER clause for database objects. Note that the target server will then create DEFINER as current SmartMYSQL user when creating the object.
DML Options:
— Generate Bulk INSERT statement: When this option is checked data from more rows will be written into a single INSERT statement. Each INSERT statement will be allowed to grow to the size specified in the ‘Max. size of BULK INSERTS’ setting.
— Generate complete INSERT statement: Select this option if you want to backup data of a table as complete insert statements. Checking this option will generate SQL statements like: insert into tablename ( col1, col2, col3 ) values ( 1, 2, 3 ). Keeping the option unchecked will result in SQL statement being generated as: insert into tablename values ( 1, 2, 3 ).
— Generate INSERT DELAYED statement: Select this option if you want to generate INSERT DELAYED statements. For more information on INSERT DELAYED
Note that to ensure the integrity of your final export result; most of the options in this section are disabled if at least one of the DB’s tables was not selected for export at the previous stages of the process. For more info Backup Database as Sqldump.
This window allows you to set various other options while exporting data.
FLUSH Options:
Options having an effect on source:
Options written to file:
Error Handling
This window allows you to configure SmartMYSQL about how to handle situations when an error occurs.
Abort on error: If you select this option then SmartMYSQL will stop the export process as soon as it faces an error.
Email notifications: SmartMYSQL’s Scheduled Backup has an option where it can send you report of the export process over mail. You can configure SmartMYSQL to send you the report only if an error occurs or every time the process executes.
To setup SmartMYSQL to send notifications over email, just select the option Email Notifications and press Next. In the next window as shown below, provide your SMTP server details to send you an email.
Executing a Job
Selecting Run immediately starts up SJA as a child process to execute the query(s) and
send the resultset(s) over email, if requested. The complete detail of the process is shown in the last step of the wizard.
Check the option Saving Options if you need to use the job repeatedly.
Finishing Up The Scheduled Export Wizard
Selecting Run immediately commands SmartMYSQL to launch the export session and show you the Wizard’s log page where you can monitor the process.
Selecting Save Configuration file brings up the below dialog. Specify the file name and press Finish; SmartMYSQL will then save your session.
Selecting Save & Schedule It using Windows Scheduler you will get the below dialog. You need to save the session details in a XML file before you can schedule it. Clicking on Finish button starts up the Windows Task Scheduler dialog.
Back up Database As a SQL DUMP
You can dump a database for backup or for transferring the data to another SQL server (not necessarily a MySQL server). The dump will contain SQL statements to create the table and/or populate the table. To generate a dump select the database or table in the Object Browser and select Database -> Backup/Export -> Backup Database As SQL Dump… This option is also available in Table -> Backup/Export -> Backup Database As SQL Dump… or just press Ctrl+Alt+E.
Database name: Select the source Database from the list of available databases.
Export as SQL: Specify the required option depending on what you need to export: only the database structure, only the data or both.
Export to file: Specify the Export file name.
Now check the following options as required by you:
Options having effect on source:
Options written to file:
Advance Options:
In SQL Dump dialog box, first select the object(s) like tables, views, stored procs, functions, triggers and events to be backedup from the source database. You may Select All/Deselect All by clicking on tree node checkboxes to select the object(s) quickly. Now select the file where you want to export the data.
Click Export to create the script (batch) file. SmartMYSQL does the export in a different thread so you can stop the export process anytime.
You can even schedule the Backup process using Scheduled backups option
SmartMySQL is a next-generation GUI tool for the RDBMS MySQL. It has unique advanced features help to Speed up SQL and PL/SQL development time, Optimize slow query and recommends optimal indexes and Debugs Production MySQL problems and provides fixes.
you can download smartmysql from download link
Download SmartMySQLCheck out Instance - a Bootstrap personal portfolio theme I created for developers. The UX design is focused on selling a developer’s skills and experience to potential employers or clients, and has all the winning ingredients to get you hired. It’s not only a HTML site template but also a marketing framework for you to build an impressive online presence with a high conversion rate.
[Tip for developers]: If your project is Open Source, you can use this area to promote your other projects or hold third party adverts like Bootstrap and FontAwesome do!
View Demo