Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Sql Comparison Tools


We've got a bunch of fairly long and complex sql statements that we need to compare between our dev and prd environments. The dev environment has been changed by a bunch of patches, while prd has been changed by an incompetent BA. Does anyone know of any tools that can help do this? Standard text/file comparison tools haven't been any help, so we're down to eyeballing them, which is both no fun and prone to error...




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Database Comparison Tools
I am looking for an easy way to be able to compare two mysql databases for their difference in tables and fields. It would also be nice for an easy way to make changes to the databases and port over information easily.I did search on this and found a couple of products that I found difficult to work with. The two main ones i tried, one froze when it tried to "sync" the databases and the supposed log of the "sync" wasn't very forthcoming and the other product just plain didn't work.I was wondering if anyone out there had this similar need and what the products/scripts were that they used? I would really thin kthere has to a least be a script that compares databases, even if you can't make changes right then and there.

Gui Tools
I'm looking for a tool that does for MySQL Db's what Access does for
Jet DB's.
Therefore provides a nice gui to speedup certain tasks and produce
entitiy relationship diagrams. Is there a market leader in this field?
Do people have recommendations?
I'm actually looking into using Visio for creating my diagrams but it
seems I would have to duplicate entry when creating DB schemas.

GUI Tools For MySQL
Reviews often cited that MySQL database lacks the GUI tools to streamline the tasks of a DBA. I sometimes wish that MySQL includes reporting tools. So everyone please post MySQL tools that help you out in administering, maintaining, or something else.

MySQL GUI Tools 5.0
I have been doing some work trying to be a better bug reporter, and was poking around in the the MySQL tools. I noticed that Lua is being used, but didn't see any place that the Lua license is mentioned. According to the lua.org site, its compatible with GPL, but does not say the GPL may be used instead of the Lua license. I searched the documentation, the help/about screens, the mysql.com site, and these forums, but I do not see the license anywhere. I am a staunch advocate of MySQL, and the GUI tools, but am worried that this omission would require me to include the Lua license in any copies of the tools that I distribute.

Reporting Tools
Does anyone know of a good reporting tool for MySQL databases that would allow me to write queries and format the query results into reports

Admin Tools For MySQL
What admin tools do you recommend for managing my MySQL databases.

In the past, I have used DB Tools, but now its not free, http://www.dbtools.com.br/EN/dbmanagerpro/

Mysql Import Tools
I am looking to convert my static HTML site to mysql, are there any tools that would make this an easier process than manually entering all the data?

DB Monitoring And Tracing Tools
I am looking for recommended tools for monitoring DB.
If open source exist, then its better.

MySql Design Tools
Hello I would like to know if you could advise which would be good design tools for MySql databases.

I already have tried MySQL-Front which is ok but no very graphical, and I tried DBDesigner 4 but this is ineffective as it refuses to connect to any of MySql databases I have setup.

Administration And Monitoring Tools
What monitoring and administration tools does mySQL offer? What costs are associated with these tools?

MySQL Maintenance Tools
Does anyone know of any good tools - third party or otherwise - that
will check your MySQL database for potential problems? I'm thinking of
corrupted data files, memory problems, performance tweaks etc.

Database Documentation Tools
I am trying to create an ERD for a large and complicated database that is running on MySql 5

So far i have got hold of a copy of windows and access and using table linking to create an access db that i can then plot the relationships for.

Of course being windoze it could never be straightforward, and it is now telling me i cannot print it due to limitations of the reporting tool.

Third Party MYSQL Tools
Is any third party software out there that I can use MYSQL database to create applications, not web based. But stand alone, sort of like ACCESS, and ORACLE. I want to be able to run it on the client side without using a browser (Stand alone).

Load Testing Tools
We are developing an application using PHP and MySQL 4.0.16, that we need to stress test. Can someone please point me to some testing tools we can use?

Developer Tools For Mysql
Which are the most popular developer tools for MySql database? I know that for oracle there are tools like Toad, DreamCoder, OraEdit.

Load Testing Tools
We are developing an application using PHP and MySQL 4.0.16, that we need to
stress test. Can someone please point me to some testing tools we can use?

MySQL Backup Tools
I have a rather large database (about 102 megabytes when dumped to an
SQL file) and need advice on backup software for MySql databases. So
far I've only tried Navicat and it takes about 30 hours to restore the
entire database using its backup function, something I find
unacceptable. Are there other tools on the market that will let me
backup/restore my database but are significantly faster?

Tools To Create Graphics
Does anybody of you know some good tools to generate graphics whereby the MySQL database is used as input?

Tools To Administer MySQL
I have used PHPMyAdmin to administer my MySQL databases before but with this you cannot change data in BLOBs.

Is there a tool where you can?

Connector.net/VS Tools Install
Just installed Connector.Net and tried to make the changes to the machine.config as per the instructons for installing Visual Studio Plugin. Unfortunately, my machine.config file does not contain any refrences to MySql so obviosuly I cannot change them. Install of connector went smoothly and I am a admin on this pc.

Best Tools To Create Online Database
First of all, this seemed the best forum to post, although this is less about databases per se, and more about tools to access said DB's, I apologize if this request is too newbie for this forum.
My Knowledge: Html, done a few web and commandline scripts in PHP, and am just learning about DB's
The Task: I need to set up a database which will contain data on historic sites, therefore it will hold names, dates, stories, and photos. I also need to create an online form of some sort to enter search criteria, and an online form to enter new data into the DB. Also the search results will need to be displayed in a logical and attractive manner. I've chosen to use MySQL.
The Question: Initially I was going to create the search, results, and data entry forms from scratch using PHP, and of course program all the behind the scenes DB accessing using PHP as well.. is there something else I should be thinking about? Could one use a CMS of some sort? in the sense that something like MySpace allows you to do searches, enter you data, and especially, displays the results in an attractive manner. Basically, are there tools to simplify this rather than coding by hand entirely? Caveat: I would prefer free/open-source or inexpensive tools (under $50 outlay)


Where MySQL GUI Tools Located On Linux?
I've just installed MySQL GUI Tools on my Linux system, but I cannot find the icon to run the program. I see the Programming folder with no shortcut inside, which created after the installation.

Trouble Installing The MySQL GUI Tools With Red Hat 8.0
I just installed MySQL Community Server 5.0 onto my computer,
which is running Red Hat 8.0 and it works fine, but
I was trying to install the MySQL GUI Tools (Query Browser, MySQL
Administration and the Migration
Toolkit) and I'm having trouble with it, I have decompressed the
installer ,

I go to the installation directory (/usr/local/mysql/mysql-gui-
tools-5.0) and type in ./mysql-query-browser to run the query
browser,

but it gives me this error message:
../mysql-query-browser-bin: error while loading shared libraries:
libgtkmm-2.4.so.1: cannot open shared object file: No such file or
directory.

HTML To MySQL Access Tools
I've signed up for a web hosting plan with a MySQL database on the back end. I need to keep the web development simple but want to make use of the DB for fundamentals such as capturing customer information and customizing presentation of products based on basic customer category or limit choices input.

I've done DBA work and some very limited web development in a past life, and I'm amazed at how much I don't remember. I would appreciate a shove in the direction of a tool, tools, or cloneable code fragments that will allow me to script some dynamic stuff against the MySQL back end with something simple like HTML forms.

Tools Like MS Access Tabel Analyse
Don't know if something like that exist for MySQL

I need to analyse a dump from another application.
Now I would like to find a tool to automaticaly search for realtions.
I can use MS Access for it but I would prefer to find a tool for MySQL.

Any tips?

MySQL GUI Tools Query Browser/Admin Login
I've just installed the GUI tools so I can get a little help with queries and table design, and I am not able to log into the administrator or the query browser. The login screens show up, I enter all the correct data, then the form grays out except for the cancel button and does nothing. Doesn't even eat up any system resources, so it doesn't even look like its trying.

I've turned off all firewall settings in case that might have cause the issue and it still doesn't work.

Just Installed MySQL And Administrator, GUI Tools Want Username Password.
I just installed MySQL and the GUI Management tools. The tools are asking for a username and password. What username and password? The only password I entered during install was for something else I believe?

Connecting To MySQL From REALbasic And Other Third-party Development Tools
I'm using MySQL 4.1.13 MAX on OS X 10.4.2.

I'm having trouble connecting to MySQL on localhost from a couple of third-party graphical client interfaces running on the same machine. I have no trouble connecting from the command line using mysql. I also have no trouble connecting using Navicat 2005. But trying to connect to the same db server from REALbasic just doesn't work.

I also use a development tool called Revolution Studio 2.6, which provides a graphical client for connection to databases, and it also doesn't work. Both of these tools connect to PostgreSQL and OpenBase just fine -- it's only MySQL that doesn't seem to work.

I've confirmed the host, user name, password, database name, and port number, all without success. In Revolution, I keep getting the following error message:

"There was an error in connecting to the database. Please check that the connection fields are correct. Revdb error: Client does not support authentication protocol requested by server, consider upgrading MySQL client."

Md5 Comparison
UPDATE admin_users SET password = md5(?') WHERE id = 1;
SELECT password = md5(?') FROM admin_users WHERE id = 1;
The result of the last query is "0", which means the values don't match. How can that be? What am I missing? The hashes look just the same when I echo them. Is it a data type problem?

EDIT: I should mention the m5 password hash is stored in a binary(64) column.

Comparison In Db.
Don't know if it's even do-able in MySQL but I kinda think it is.

lets make an example table over a log.

day - action
1 ---- foo
1 ---- bar
2 ---- foo
2 ---- foo
2 ---- bar
2 ---- bar
2 ---- foo

Now I want, with one query, most of all, select the increase in percent and the name of the action that has increased the most from day one to day two. If this isn't possible I would like to select the name, the amount for the action on day one and the increase of the top increaser.

Dates Comparison??
I'm trying to find people from my db based on a given min_date and max_date using:

SELECT . . . WHERE birthdate BETWEEN '".$dd_min_age."' AND '".$dd_max_age."'
but if a range is specified there are no results returned.

If I choose though the same date for min and max then I get the corresponding results.

Comparison Query?
I have two tables in my database that collect membership/user info. How do I write a query to compare the two and have the query spit out the users that are on one but not the other?

Comparison Query
I have two tables, I have a company table and a client table. The fields in question are as follows

Company.companyid
Company.maincontactid
Contact.contactid

Due to bad design and bad data entry we have a bunch of companies with a contact number but no entry in the contact table. I want to run a query to dump a list of Company.companyid and Company.maincontactid where Company.maincontactid has no corrisponding Contact.contacid

Text Comparison
I'm having a problem with one query. My database has the following
fields: id(int), time(int), and groupfield(enum - 5 possibilities). I
want to select all the rows where the time is between let's say 12 and
24 and the group is specified by the user using a html drop list. The
variable is named $group. Code:

String Comparison
I need to search a table for certain area codes. Because the office does not have a uniform way of entering phone numbers into the database, some are entered as (555)555-5555 and others as 555-555-5555.

I have a select statement in which I want to return phone numbers beginning with a certain area code indepent of how the phone number was entered.
I've tried the following:

CODESELECT customers_telephone FROM customers WHERE customers_groups_id = 3 AND customers_telephone
like '(310)%' OR customers_telephone
like '310%'

String Comparison
I would like to search a column of strings for matches to a given prefix. Is there a way to use existing string comparison functions to do this? Specifically I'm looking for the number of leading characters identical to my (variable) search string:

Example: looking for matches to prefix "Robb"

SELECT names, some_functions(names, "Robb") AS m FROM etc, etc, etc...

| names | m |

| Roger | 2 |
| Robert | 3 |
| Roseanne | 2 |
| Cary | 0 |
| Randy | 1 |
| Robby | 4 |
| Allison | 0 |

Return the highest value of m for which LEFT(names,m)=LEFT("Robb",m).

I've been reading through the section on string comparison function, but can't find anything suitable. But perhaps there is some combination of funtions you could use?

String Comparison
When i update a table i am carrying out a check to see if that entry already exists. This is ok when it is the same case but when it is different it allows it.

select
count( entityid ) as COUNTENTITIES
from
entities
where
code = '%1%'

I have tried LIKE but that didn't work either

What i am after is if there is a code 'c1' in database and someone tries 'C1' i want that to fail because 'c1' is already there. Is this possible?

Database Comparison
I am looking for some papers/information that compare relational
databases such as oracle, mysql, sql server etc. I am particularly
interested in their features such as locking mechanisms, integrity
constraints, views... Anyone know where I can find the information?

Float Comparison
I'm writing a simple database with one table and a few fields that lists some books. One of the fields is an Unsigned Float field that lists the book's reading level. Then I have a PHP/web page front end that users can search for books listed in the database.

Basically this is the probelm I'm having:
If a user asks for all the books between the reading levels 3.0 and 3.3 -- MySQL returns every record that has a reading level of 3 up to and including all the books with a reading level of 3.3. However, if a user types in the form they want all the books between 3.0 and 3.2 -- MySQL returns all the 3.0 and 3.1 books, but returns none of the 3.2 level books.

The code is a simple select query that ends up being:
SELECT * FROM MyTable WHERE ReadingLevel >= 3 AND ReadingLevel <= 3.x

Previous Row Comparison
I have a table in this format:

Column A | Column B
1 | 2
1 | 3
1 | 4
2 | 5
.....
.....

What I want to do is something like this:

If in Column A there is a change in the number i.e. from the above table there were many 1s which transitioned into a 2. I want to record this change. I want to extract these two rows into another table. How can I make this possible?

Date Comparison
I have date comparison problem with mysql... why doesn't the date get in the set? (2nd query returns empty set)


mysql> select version();
+------------+
| version() |
+------------+
| 4.0.20-log |
+------------+
1 row in set (0.00 sec)


mysql> SELECT RecordID FROM Record WHERE DATE_ADD(PostDT,INTERVAL 11 HOUR) >= CAST('2005-3-13 00:00:00' AS datetime) AND DATE_ADD(PostDT,INTERVAL 11 HOUR) <= CAST('2005-3-13 23:59:59' AS datetime) ORDER BY PostDT DESC;
Empty set (0.00 sec)

mysql> select DATE_ADD(PostDT,INTERVAL 11 HOUR) FROM Record;
+-----------------------------------+
| DATE_ADD(PostDT,INTERVAL 11 HOUR) |
+-----------------------------------+
| 2005-03-13 12:00:00 |
| 2005-05-27 21:53:30 |
+-----------------------------------+
2 rows in set (0.00 sec)

Date Comparison 2
I want to compare dates in sequential records (in mysql format YYYY-MM-DD) in a db. I have a loop to iterate through a set of records. In this loop, how can I refer to the previous record in the loop?

As in:

for ($i=0; $i <$num_results; i++) {
$row = mysql_fetch_assoc($result);
if ($row('thisDate') != the previous record's date) {
do something
}
}

Date Comparison
In a php_mysql query the following variable:

$ckDate = $year . "-" . $mo_sel . "-01"; produces a string in the format YYYY-MM-DD.

The $year and $mo_sel variables have been posted from a form.
The problem I am experiencing is that in trying to SELECT from a table by comparing the $ckDate variable to the arrDate field in the database, the search returns a result no matter what the comparision date is, as in:

"select * from this_table where 'arrDate' >= '$ckDate'"

No matter what the value of $ckDate, the query returns data.
Does this variable have to be coerced in some manner?

DATE COMPARISON
I was wondering if there is a date function to get the older date between
two dates?. Or smething that indicates me that one date is older than the
other one.I know that I have the function YEAR,MONTH,DAY and I can use them, but I
don't know if exists a function that can do the same.

Comparison Optimization
On to my problem. I'm running a query on a table with over 100,000 rows in it. Basically, my query is performing a "similar" check on books that people have logged in their "book list". It looks through the table and checks to see who has the most number of books similar to you. Here's the query:

select count(a.mem_id) as numMatches,m.username,m.mem_id as memberID from book_list a LEFT JOIN book_list_members m ON a.mem_id=m.mem_id where a.book_id in(224,164,30,43,47,1,6,52,90,45,120,270,...,2442) GROUP BY a.mem_id ORDER BY numMatches DESC LIMIT 50

In the in() comparison, this can be anywhere from 1 integer to 1000 integers, it all depends on how many books a user has in their list. I've indexed "book_id", but unfortunately if there are more than say, 100 elements in the IN() comparison, the query takes anywhere from 1-2 seconds to execute. That's a long time when I have hundreds of users hitting a website and running that query. Is there a better way to do this? Is there a way I can "store" this query result somewhere, and only have it updated every couple hours (cached in other words, for immediate access).

Datetime Comparison
I have a query in a php page that goes something like this:

SELECT * FROM posts WHERE post_time < '$php_var_date' LIMIT 0,1

I'm using this in a blog where I need the previous post's post date.  php_var_date is an ISO 8601 formatted date.  The post_time is of the data type datetime.  While I don't get an error on execution of the query, it keeps returning the date EQUAL to php_var_date instead of the one previous to it. My question is, is this a MySQL glitch or is it something incorrectly set on the server?

Fake Date Comparison
Code:
select * from tareas where STR_TO_DATE( fecha, '%d/%m/%Y' ) = STR_TO_DATE( 19/11/2007, '%d/%m/%Y' )' order by STR_TO_DATE( fecha, '%d/%m/%Y' ) DESC

Yes, an operator wrong, but why ?

Date Comparison Problem
I have a website with a diary of events. I have just come across this problem:

The diary is listed on the site month by month - you can click a month and events for that month will show up. Events have a from date and to date and can span across multiple months. This has all been working fine until I added an event running from december 06 to january 07 - it no longer showed up. Here is how my query looked:

(using december 2006 as the selected page as an example)



SELECT * FROM diary WHERE (MONTH(from_date) <= MONTH(&#55614;&#57158;-12-01') AND MONTH(to_date) >= MONTH(&#55614;&#57158;-12-01') AND YEAR(from_date) = YEAR(&#55614;&#57158;-12-01')) OR (MONTH(from_date) <= MONTH(&#55614;&#57158;-12-01') AND MONTH(to_date) >= MONTH(&#55614;&#57158;-12-01') AND YEAR(to_date) = YEAR(&#55614;&#57158;-12-01')) ORDER BY from_date, to_date
Now looking back it is obvious that this will not work as it is looking for a match in the years. After some research and trial and error I have come up with the following query:



SELECT * FROM diary WHERE (UNIX_TIMESTAMP(&#55614;&#57158;-12-01') BETWEEN UNIX_TIMESTAMP(from_date) AND UNIX_TIMESTAMP(to_date)) ORDER BY from_date, to_date
However this is still not working.

This is really bugging me and any help will be greatly appreciated.

Thanks!

How To Write Like Comparison In Procedures?
this sample procedure takes in an username, searches for number of entries matching the pattern of the username.

delimiter $$
create procedure sampleDB.sampleProcedure( IN m_username varchar(30), OUT m_username_matched_count int )
deterministic
begin
if length(m_username) = 0 then
set m_username = 'jason' #set temporary name if empty
end if

set m_username_matched = 0; #finds number of matches for the given username

select
count(*) into m_username_matched #store into the variable to be returned
from
sampleDB.sampleTable
where
userName like '%m_username%' #this is the statement that does not work#

end$$


Copyright © 2005-08 www.BigResource.com, All rights reserved