That’s it! You have successfully restored a MySQL database from a backup with MySQL Workbench. When the restoration is complete, you’ll see an “Import Completed” dialog. Make sure “Dump Structure and Data” is selected from the dropdown. Since we are restoring the entire database from a self-contained file, “Select Database Objects to Import” is left blank because there is no need to select specific tables. The drop-down should be pre-populated with the schema name from the backup file. Select the “Default Target Schema” from the drop-down. Select “Import from Self-Contained File,” and locate the backup file that will be used for restoration. See “ Making a MySQL Database Backup With MySQL Workbench,” for an explanation of the difference between a self-contained file and a dump project folder. Now click the “OK” button in “Manage Server Connections” to close the connection test window.Ĭonfiguring MySQL Workbench to Restore (Import) Your DatabaseĬlick the box for the database connection that you just set up.įor this tutorial, we’re assuming you are restoring a “Self-Contained File” backup. Click the “OK” button and move on from there. If everything is correct, you’ll see the successful connection box. If you get a “Cannot Connect to Database Server” error, check your entries in the connection fields. Click the “Store in Vault…” button to enter the database password (if you don’t want to store the password, skip this field).Enter the MySQL server hostname or IP address.Choose “Standard (TCP/IP) as the “Connection Method” (SSH connection configuration is available if your host requires it).Open MySQL Workbench and click the + icon to start a new database connection.Ĭomplete the five connection and authorization fields underlined below. If your website uses cPanel, you can set up a remote connection in Databases > Remote MySQL. Check with your host to see what their requirements are. Many commercial hosts block outside database connections, so you may have to add your home or office IP address to a remote access list. Configuring MySQL Workbench to Connect to Your Database This will cover everything for you in one spot, in case you’ve never done so. We will also cover the necessary configuration to connect to your database with MySQL Workbench. In this tutorial, we will go through the steps to restore a database from a backup. Let’s see what it takes to restore a MySQL database with Workbench.īefore we get started, our tutorial, “Making a MySQL Database Backup With MySQL Workbench,” covers the backup part of the equation (using MySQL Workbench). And of course, MySQL was not set to use port 3306, as the start page led me to believe.If you perform your own database backups, it’s also possible to do your own database restoration without relying on a host or third party. It turns out that MAMP has a preferences panel wherein you can configure the ports for your Apache and MySQL servers. When testing the connection, however, I got the dreaded “Failed to Connect to MySQL at localhost”: The start page instructs you to use port 3306. The information presented there is misleading. Once MAMP is installed and the MySQL server has started, you’ll be taken to a start screen that looks something like this: Hopefully this signpost will help others having connection issues with MySQL Workbench to MAMP MySQL servers as well. The solution was simple, but getting there led me around the Internet and back with little help. I did, however, spend at least 45 minutes trying to get MySQL Workbench to connect to my local MySQL database server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |