Requirements Before You Start
- Download and Install MySQL Workbench
Get the installer from MySQL official website. - Database Access
- Hostname or IP address of the server
- Username (e.g.,
rootor another user with access) - Password
- Port (default is
3306, but some servers — like in cloud hosting or MySQL Workbench AWS RDS — may use different ports such as3336)
Steps to Connect to Database in MySQL Workbench
Step 1: Open MySQL Workbench
Launch the program after installation. You will see a home screen where you can create a new connection in MySQL Workbench.
Step 2: Create a New Connection
- Click “+” (New Connection).
- Fill in the required fields:
- Connection Name: Any name you like, just for display.
- Hostname: The server’s IP address or domain. This will be provided in your service dashboard.
- Port: Default is
3306, unless your provider specifies another. - Username: Usually
rootor another MySQL user account.
Note: Most servers do not allow external
rootconnections. If you see “MySQL Workbench cannot connect to database server” or “MySQL Workbench no connection established”, you may need to log in directly on the server (e.g., via RDP or SSH) and connect locally.
Step 3: Test the Connection
- Click Test Connection.
- Enter your MySQL password.
- If the test is successful, click OK to save the connection.
If you get “MySQL Workbench test connection failed” or “Cannot connect to database server MySQL Workbench”, check:
- Correct hostname and port
- Security groups or firewall settings
- User permissions
Step 4: Connect and Manage Your Database
Once saved, simply click your new connection to open and manage your database. You can now:
- Browse schemas and tables
- Run SQL queries
- Manage users and permissions
Outline
