I am trying to learn some mysql, php, apache and yii for a personal project, which will hopefully be extended to something commercial.
I'm designing the schema on MySQL workbench and forward engineering it to the local MySQL server. Everything is good up to this point. My idea is to develop and update the database right in the server and then reverse engineering or syncing it with the Workbench for seeing it in a diagram. But when I try to reverse engineer the database, none of the tables are imported (and they actually have been created by Workbench itself.
I've tried to troubleshoot the problem and created a database on server, with just one table and with just one column in it, which is in VARCHAR datatype. This database have been reverse engineered without a glitch. But when I try to add a INT and a DATETIME column to it, it bumps into a wall:
Windows version of MySQL Workbench (6.0.8)
WARNING: Mapping failed for datatype `int(11)`
WARNING: Mapping failed for datatype `datetime`
Linux version of MySQL Workbench (6.0.8)
ERROR: Line 5: SQL syntax error near 'int(11) NOT NULL,
`name` varchar(20) DEFAULT NULL,
`insertDate` datetime DEF'. Statement skipped.
(MySQL server Ver 14.14 Distrib 5.5.34 / on a Ubuntu 12.04 LTS box)
I should add table itself works perfectly fine when I try to add, update and delete rows.
Any ideas about what I'm doing wrong?
Edit- Based on peterm's response,
I've actually also tried syncing the model with database rather then reverse engineering, thats also not working (I was going to post some images, but couldn't due to low reputation). Under Source section, it shows an yellow exclamation mark and N/A, even though I've triple checked the table is there. In fact, it has been created by the MySQL Workbench itself!
After peterm's response, I've repeated the syncing process in order to take screenshots. While doing that I've noticed something else. When I try to update the table via MySQL Workbench, it throws the error:
Error parsing DDL for `test2`.`inttest`
There was an error while parsing the DDL retrieved from the server.
Do you want to view the DDL or cancel processing it?
When I click View DDL it shows the table creation script, but INT and VARCHAR keywords are in lower case.
I'm no expert, but shouldn't int's and varchars be in upper case?
And this is just in - When I try to edit the DDL on the opened window (last screenshot), MySQL workbench shuts down, and it also freezes the firefox tabs with flash player. It also shuts down my Windows virtual machine.
Since you previously created a model use Database -> Syncronize Model instead of Reverse Engineer.
In dialog Model and Database Differences choose Update Model and click Continue.
Related
I would like to send Excel data to mysql database using mysql for Excel. But when I click Connection(any connection), An error appears:"The given key was not present in the dictionary"
how can i fix it?
Thank you.
I had the same issue and just solve it today.
I used to have "MySQL Server Version: 8.0.31".
I've downgraded it to "8.0.20" and now it's working.
MySQL Installer Overview
To downgrade it, I
(1) Removed the current MySQL Server Installation
(2) then i "Add" the new one, but explicitly selected "8.0.20"
Version Overview
Be Aware!
When Deleting the MySQL Server, your current Databases will be removed. Make sure you have Backups / Exports of it.
Forward engineering : Problems with transfering data from an EER model to the SQL editor.
I am new to databases development and SQL. It seems like the forward engineering feature in My SQL Workbench is not working properly. I am able to edit or add fields in different tables in the EER-Model but when I run the forward engineering, the changes, I had made in all the tables, don't show up in the SQL editor.
I installed MySQL Workbench software and I configured it to run on a live server .I created an EER-diagram and I can edit and modify the schema properly ,create relationships, add new tables.
When i run the forward engineering feature , it seems to run without any problems, there are not any ERROR prompts or warnings and at the ending of the procedure there is a prompt saying : "Forward engineering completed Successfully!". The message log window appears to be right and I can't identify where the problem comes from.
Any help would be appreciated.
I think it's some kind of bug on the version of MySQL so instead of choosing the option 'Database->ForwardEngineer' there is a workaround
'Database-->SynchroniseModel' this should show all your changes in SQL Editor
Hope that helps!
go to edit and then preferences then modeling->MySQL and then type 5.7.9 in the Default Target MySQL version
forward engineering don't work sometimes because of mismatch version
I have a freshly installed workbench 6.3 version and a 5.1 mysql Server version.
I already have connections created. Namely, I can successfully connecto to local Instance MySQL56, which I assume is a default connection. I have two, way older connections that have appeared even though last time I used this program (and later uninstalled) was months ago, with another version.
I've read what I've found and felt could help
MySQL Workbench 5.2 CE, Windows 7, "Can't connect to MySQL Server on 127.0.0.1 (10061)"
MySQL Workbench: "Can't connect to MySQL server on 127.0.0.1' (10061)" error
And tried every option. Nothing works. I try to create a connection with this steps:
Database -> manage connections -> bottom left corner: New
Then I give it a name, leave everything as default, put a pw into the vault, and try to test it. Does not work. Whatever combination I try, it does not work. Yes server is running, I've tried 3 different ways of checking.
I do not understand at all how something I've done in the past is taking me so many hours, I do not know what I'm missing, but I can't create a new connection.
Also to be noted, in case it's useful: On default schema, I write the name of a schema I previously created. Thing is, as I said, I've tried every combination. But when I've tried to save said schema in a folder, workbench has instantly crashed. Twice already.
I'm all out of ideas, so if anyone can tell me what to do, it'd be of great help, I find nothing following guides out there.
I'm using MySql Workbench and WAMP Server. I have a database on the server and when I click reverse engineering on the workbench it imports the db structure, but not any of the inserts. What do I do to get the db data as well as the structure into the workbench.
Also on a separate point as I was using workbench, i noticed it did not automatically sync with the db on the server, ie. when i insert a new row, it did not reflect in the server.. must I forward engineer the db to the server every time i make a change? So sorry for my lack of understanding
MySql Workbench reverse engineering is only to obtain the Schema of the database.
If you want to search the database, make backups, obtain the schema and much more then you can use phpMyAdmin. There are some installers which configures the whole system to work with WAMP enviromment and includes it, like Xampp or ZendServer;
I've instaled MySQL workbench in Windows 7 64bit. Unfortunately, I'm facing problems:
In the Object Browser, when I click on my DB and right click on tables to create one, I can not insert any column (disabled) and therefore, can not insert tables. check this:
Can not create table in MySQL workbench 5.2.40
I can create table from the EER model. But even though, I faced problems when tried to connect my Java application to this database.
MySQL and Java: table doesn't exist
I have searched, and not sure from this, some of what I found is that workbench have probelms with Windows 7 - 64 bit (any idea if this is correct??). The only version I found was for 68, it installed successfully but I'm having probems.
I want to downlod MySQL server but before that: Will Mysql Server give me the same features that the workbench does? I need to work with GUI (insert, delete, update,..etc).
EDIT:
Also, the table I added using the EER are not visible in the Object browser. I only can see the schema in the Object browser without any table underneath it.
MySQL Workbench is a MySQL Server GUI. The two are different products. MySQL Workbench requires a MySQL Server connection for most tasks (except for data modeling). This reliance on a MySQL connection is clearer in the latest version of MySQL Workbench (6.1) than it was in 5.2.
MySql Workbench and MySql Server both are completely different things. MySql Server is basically a database and MySql workbench is a GUI or graphical management tool which helps us interact with MySql server database.
Similarly, SQL Server Management Studio is the graphical management tool for SQL Server.
Both are for manipulate the structure, queries and function, procedure, etc....
In Both you can Use DML and DDL
If you ask me I love Server even if you can create really cool designs on workbench, but basically you can do the same in both (insert, delete, update,..etc and more)
So it's up to you, I think MySQL server is a little bit lighter that Workbench, but if you want to, try it both.
Workbench looks like more friendly