MySQL phpmyadmin alternatives (mySQL workbench like) - mysql

I'm familiar with MS SQL server 2008 and I want to switch to an more open minded/source DBMS;
I found out that phpmyadmin is the most widely used tool to manages mySQL databases but I find it very difficult to work with. In SQL server I was used to create tables from the designer (in diagram -> add new table) and only if I needed some extra features I actually modified the table.
Can I do the same thing from phpmyadmin? I really hate that every time I create a new table to be asked how many rows it will have and there are plenty of options displayed even if I do not use them.
So any alternatives???
P.S. mySQL workbench seems the right tool for me but I think you are not able to create tables from the designer only to edit existing tables. (Correct me if I'm wrong)

You can create table in MySQL workbench using designer interface, If you are looking for alternatives try HeidiSQL or SQLYOG, for more options visit this.

you can create table visually using workbench.
Check out this article
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/

I recommend Chive for a simple web based solution

Try Webdbadmin.
http://www.webdbadmin.com is what I recommend you.
Works like a desktop app, but it's web-based.

Related

How to use the generated script from SQL 2005 to MYSQL?

We are converting our database to MYSQL from MSSQL 2005.
Someone told me this is possible by generating a script in MSSQL using Database Publishing Wizard. I already created a script. Then by dragging it to the Query Writer in MYSQL. I am currently using SQLyog for creation of database.
How can I use that script to create a MYSQL file?
I also tried to use demo versions of converting tools but to no avail.
Please help me. =)
There is no simple or quick way to do a task like this. THe two database have differnt syntax and differnt datatypes, etc. I certainly would not trust a converting tool as you may want to make changes to fix bad design choices in SQL server to better choices in MYSQL.
Take your script and then run each section and find where it fails and then look up the correct syntax for mySQL and fix it.
Here is alink to a book you need to have for this conversion project as it wil show the syntax differnences:
http://www.amazon.com/SQL-Nutshell-OReilly-Kevin-Kline/dp/0596518846/ref=sr_1_2?s=books&ie=UTF8&qid=1330382519&sr=1-2

Synchronizing tables on 2 MySQL servers

I have 2 MySQL servers: one for development, other for production. Both contain same table structure, but different data on tables.
When I have done change on dev server, like add column to table, I have manually made the same change later to production server. But this slow and error prone, especially if there are many changes to be made at once.
Is there better way to do this? I have phpMyAdmin, maybe that has some neat trick?
Also, is there a dedicated term for what this process is called? Searching for 'table update' or similar does not yield results on this topic.
EDIT:
Forgot to mention that I am using Windows.
So apparently I need some kind of diff tool for this. I haven't tested all of these proposed software yet, but so far they seem very useful.
I've used Red Gate's SQL Compare before for SQL Server; this is their MySQL product. I don't have the budget to buy it myself, but if it works anything like SQL Compare did, it'll do exactly what you want it to do.
When ever I do this I have used the data or structure sync in a Mysql GUI app called Navicat, there is a free version available and it does what you asked perfectley.
Try to compare and synchronize databases with schema/data comparers in dbForge Studio for MySQL.

MySQL database change tracking

What tools are you using to track changes in your MySQL database? Currently I'm in a project where we use a plain text-file (version controlled via SVN) in which we manually add SQL statements when making changes to the database.Many of the changes magically disappears every now and then, and we are now looking for a better way to change track our database.
EDIT:
One thing that I forgot to mention, we are using stored procedures and functions, so it's not only the database structure that we want to track changes on / version controll.
There is a simple solution:
Make all changes to the database schema and static data via scripts
Version control the scripts
Toad for MySQL has a great schema comparison tool
http://www.quest.com/toad-for-mysql/
I think you need something like this (I test it for Firebird and it works very well) :
http://www.upscene.com/products.audit.index.php
I thought there was a MySQL version but NO :(
for MySQL, I see just this :
http://solutions.mysql.com/solutions/partner.php?partner=1532
But if it is just for development, I think that the answer given here is good
mysql-diff compares tables, but not stored procedures yet.

Is there a tool that can visually map table relationships in MySQL?

I'm looking for a tool that can map the relationships in my database in mysql. I would like something like the view that is generated in MS-SQL Server Management Studio in the 'Show Diagram Pane'. Does such a thing exist?
I'm in charge of the design of the database and its using rails conventions. I would not be adverse to specifying relationships by hand.
Doesn't MySQL Toad have a schema diagram tool? I think it does. I'm not a diagram guy (much happier with mysqldump output) but I've worked with many people who swear by Toad.
Maybe the official tool has that?
http://dev.mysql.com/downloads/workbench/5.1.html
MySQL Workbench 5.1.16 is buggy on my OS X 10.5.7 system. I found that it does things like crashes and vanishes with no error. Or it will error out when trying to change page size in the print setup.
I also tried running it on Windows XP under VMWare. It seemed more stable and usable there. I was able to reverse engineer a DB and create a diagram.
One year ago I used DBVis together with Oracle. It believe it also works with MySql.
Altova DatabaseSpy will show them if you are on Windows. If not, the easiest way is to query INFORMATION_SCHEMA (if you're using v5 or later of MySQL) and check out the key column usage statistics for all the tables. This is easy to script.
Most MySQL databases still use MyISAM tables, which do not provide foreign key constraints. Without explicit FKs the best you can do is guess at the relationships between tables.

How to synchronize development and production database

Do you know any applications to synchronize two databases - during development sometimes it's required to add one or two table rows or new table or column.
Usually I write every sql statement in some file and during uploading path I evecute those lines on my production database (earlier backing it up).
I work with mySQL and postreSQL databases.
What is your practise and what applications helps you in that.
You asked for a tool or application answer, but what you really need is a a process answer. The underlying theme here is that you should be versioning your database DDL (and DML, when needed) and providing change scripts to be able to update any version of your database to a higher version.
This set of links provided by Jeff Atwood and written by K. Scott Allen explain in detail what this ought to look like - and they do it better than I can possibly write up here: http://www.codinghorror.com/blog/2008/02/get-your-database-under-version-control.html
For PostgreSQL you could use Another PostgreSQL Diff Tool . It can diff two SQL Dumps very fast (a few seconds on a db with about 300 tables, 50 views and 500 stored procedures). So you can find your changes easily and get a sql diff which you can execute.
From the APGDiff Page:
Another PostgreSQL Diff Tool is simple PostgreSQL diff tool that is useful for schema upgrades. The tool compares two schema dump files and creates output file that is (after some hand-made modifications) suitable for upgrade of old schema.
Have scripts (under source control of course) that you only ever add to the bottom off. That combined with regular restores from your production database to dev you should be golden. If you are strict about it, this works very well.
Otherwise I know lots of people use redgate stuff for SQLServer.
Another vote for RedGate SQL Compare
http://www.red-gate.com/products/SQL_Compare/index.htm
Wouldn't want to live without it!
Edit: Sorry, it seems this is only for SQL Server. Still - if any SQL Server users have the same question I'd definitely recommend this tool.
If you write your SQL statements for your development database (which are, I imagine, series of DDL instructions such as CREATE, ALTER and DROP), why don't you keep track of them by recording them in a table, with a "version" index? You will then be able to:
track your version changes
make a small routine allowing the "automatic" update of your production database by sending the recorded instructions to the database.
I really like the EMS tools.
There tools are available for all popular DB's and you have the same user experience for every type of DB.
One of the tools is the DB Comparer.
TOAD
saved many an ass several times in the past. Why do people run sql with no exit strategy?
the redgate one is good also.
Siebel (CRM, Sales, etc. management product) has a built-in tool to align the production database with the development one (dev2prod).
Otherwise, you've got to stick with manually executed scripts.
Navicat has a structure synchronisation wizard that handles this.
I solve this by using Hibernate. It can detect and autocreate missing tables, columns, etc.
You could add some automation to your current way of doing things by using dbDeploy or a similar script. This will allow you to keep track of your schema changes and to upgrade/rollback your schema as you see fit.
Here's a straight linux bash script I wrote for syncing Magento databases... but you can easily modify it for other uses :)
http://markshust.com/2011/09/08/syncing-magento-instance-production-development
DBV - "Database version control, made easy!" (PHP)