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


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How To Find Out Which Table Is Changed?


I dont have source code of my web application I installed. Its using mysql 5. when I create a new user account, I know "users" tables is changed, but there's also a couple other tables are modified.

Is there a way I can find out which table is changed?




View Complete Forum Thread with Replies

Related Forum Messages:
I Changed Root Password But I Can Not Login With Changed Password
I changed the password of root with
update user set password=password('newpassword')

Then I exited. But when I want to login again , it cannot authenticate the root
I should tell you that a hacker had changed my root password before. Because it was not encrypted before.

View Replies !
Find Rows In One Table
I am setting up an osCommerce store and have discovered that some products do not have corresponding entries in the categories table. I need to find these items (there are roughly 5000 items) so that they can be fixed.
These are the relevant tables:

Table Name: products
Primary Key: products_id

Table Name: products_to_categories
Primary Keys: products_id and categories_id

I need to find all rows in products that do not have a corresponding entry in products_to_categoriesIs this possible?

View Replies !
Find The Size Of The Table
Is there any function OR any way to find a size of the table?

Let us assume the table contains the 3 rows and 4 columns, if i add the one more column does this increases the table size. How to find the size of the table?

View Replies !
Where To Find Table Prefix
I'm trying to convert my forum to PBPBB3 from PHPBB2 and its asking what my table prefix is. Where can I find this?

View Replies !
Need To Find 1 Occurance In A Table
I have a database storing photos. I want to display the first picture from each album on one page. The table in question has, say, 10 pictures, all with the same "album" id. I want to pull the first picture from each album.

Any ideas?

View Replies !
Mysqldump Can't Find Table
I'm trying to do a backup of just 1 table but when I run the command mysqldump -h machine -u lagoona -p database_name [collection] > collection.sql
it complains that it can't find the table called collection which is definitely in the database. mysqldump: Couldn't find table: "[collection]"
Is this the right command to use, I'm not that familiar with mysqldump? It's on linux and I'm running it from the command line. I can connect OK to the database itself when I use the command mysql -h machine -u lagoona -p
I've also tried it as root and as my own username but no difference.

View Replies !
How To Find Table Type After Creation
How can I tell if I have created InnoDB tables or MyISAM?

View Replies !
Find The Number Of Columns In A Table
in mysql, how could i find the no.of columns in a table through a query.

View Replies !
How To Find The Size Of A Single Row In A Table?
How do I find the size (in bytes) of a single row in a mysql (4.1) table?

View Replies !
How To Find Previous Records In The Same Table
how to find previous records in the same table ...

View Replies !
Find Nearest Value From Lookup Table
I am trying to implement a 'nearest value' lookup table

name (name age table (100k+ records)
id age
1 1.0
2 2.2
3 3.3
4 4.4

I want to lookup closest age and pull out the appropriate correction factor.

cf (correction_factor)
age factor
1.0 10
2.0 20
3.0 30
3.5 35
4.0 40

desired output
id age factor
1 1.0 10
2 2.2 20
3 3.3 35
4 4.4 40

Looking at past forum posts I tried the following query which finds the nearest value OK..

( SELECT factor FROM cf WHERE age > name.age ORDER BY factor ASC LIMIT 1 )
UNION
( SELECT factor FROM cf WHERE age <= name.age ORDER BY factor DESC LIMIT 1 )
ORDER BY ABS(cf.age - name.age)
LIMIT 1

I understand the (SELECT...UNION...SELECT) part but cannot figure how to put it into a bigger query to get my desired output.

I tried

SELECT id, age,
(( SELECT factor FROM cf WHERE age > name.age ORDER BY factor ASC LIMIT 1 )
UNION
( SELECT factor FROM cf WHERE age <= name.age ORDER BY factor DESC LIMIT 1 )
ORDER BY ABS(cf.age - name.age)
LIMIT 1)
FROM name;

View Replies !
How Can I Find Out The Names Of The Indices Of A Table?
I can do CREATE INDEX ...e.x.:

CREATE INDEX foo ON some_table;
CREATE INDEX bar ON some_table;

Is there a SHOW commaand that will display the indicies of a table?

e.x.: SHOW INDICIES ON some_table;

View Replies !
Can I Use Mysql Query In Jsp To Find Table?
we can use sql query to find attribute in jsp. If I want to find table?is it possible?

View Replies !
Find If Field In A Table Exists Or Not
Is there a way to find out if a field in a table exists before trying to send data to it?
then if not exists create it.

View Replies !
How To Find Out If A Msql Table Is Locked From A Php Script
Is there any way with a php to find out if a table is locked before using a mysql_query on the table?

View Replies !
Error 1032 - Can't Find Record In Table
I have a problem with a very simple table when using partitioning in mysql 5.1.11 on SuSE Linux 10.0:

Table Information:

CREATE TABLE `adr-0` (
Adr varchar(255) COLLATE latin1_german1_ci NOT NULL DEFAULT '',
Qty int(10) NOT NULL,
PRIMARY KEY (Adr),
)
ENGINE=MyISAM DEFAULT CHARSET=latin1
COLLATE=latin1_german1_ci
PARTITION BY KEY (Adr) PARTITIONS 10 ;

now i'm entering data into the table:

insert into `adr-0` values ('TestAdr','1')
on duplicate key update Qty = Qty + 1;

this works fine until the "on duplicate key" triggers. When a duplicate key is found I get the error 1032 "can't find record in adr-0" instead of an increasing field qty.

I see no limitations in the partioning section of the mysql documentation which could cause this error. On a non-partitioned table it works fine under 5.1.11.

Is someone out there who knows if this is a bug or a feature?

View Replies !
Find Double (not Uniqe) Entries In A Table
I've got a table that looks like this (offcourse, the real one is much bigger):

id| name | city
1 | john | 19
2 | bella | 11
3 | john | 12
4 | mike | 06
5 | alex | 12
6 | simon | 19
7 | alex | 11

.. and I want to select the 'id', 'name' and 'city' of those entries that the field
'name' isn't uniqe, in this case, john and alex. How should my sql-query look like?

View Replies !
How To Find Records That Are NOT Referenced In A Join Table?
Table structure...


CREATE TABLE category
(
id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40) NOT NULL
);
INSERT INTO category (id, name) VALUES
(1, 'CSS'),
(2, 'HTML'),
(3, 'XML'),
(4, 'Javascript'),
(5, 'PERL');

CREATE TABLE category_j_article
(
category_id TINYINT UNSIGNED NOT NULL,
article_id INT UNSIGNED NOT NULL,
PRIMARY KEY (category_id, article_id)
);

CREATE TABLE article
(
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40) NOT NULL
);

Let's say I want to find all articles that aren't filed under multiple categories? For example, if I want to find articles that aren't filed under the CSS and HTML categories?

View Replies !
Changed Characters
While using mysqldump to backup the databases on my server i noticed that all the the portuguese accented characters from my databases get screwed up and changed to wierd characters.
What's up?

View Replies !
Having MySQL Find Only Orders With Multiple Rows In Another Table
In PHP I could just do a querey of all ordernumbers and within the
WHILE do a querey of orderitems where the ordernum equals the original
querey, and then do what I need IF numrows > 1.

But surely there's a way to maybe do that in the mySQL querey? Some way
that might be more efficient than a querey of EVERY order?

If there's simply a name of some topic in mySQL that might apply, just
tell me to look that up. For example: "Take a look for 'distinct',

View Replies !
How To Find Total No. Of Records In A Table Having Same Info In Some Fields?
i just want to find out total no. of records in a table which is having same information in some fields of table mean matching information in the fields. i can elaborate it as suppose i have a survey table which is having 4 answers fields and there are thousands of records in that table, i want to know how many people have given same answers.


View Replies !
Changed User Privileges And Now I Can't Log In
I read several web sites and O'Reilly's book on MySQL about securing the system tables.

I removed several users and, as advised inthe book and web sites, changed the user "root" to another name with another password.

I removed the site name as a host but kept the IP address.

Now when I use phpMySdmin to get back in, it let's me past the login popup BUT it gives me the message:

Error
MySQL said: Access denied for user: 'root@localhost' (Using password: YES)

The data in the database is not important but the database structure/definition is. I'd like to find a way to back up or dump that. Then I can reload MySQL and start over.

View Replies !
Get The Latest Changed Records
I hava a table with the following information

CREATE TABLE TEMP1 (REFID INT, REVISION INT, FIELDNAM VARCHAR(10), VALUE VARCHAR(10));
INSERT INTO TEMP1 VALUES(1001, 0, A, A2);
INSERT INTO TEMP1 VALUES(1001, 0, C, C2);
INSERT INTO TEMP1 VALUES(1001, 0, E, E2);
INSERT INTO TEMP1 VALUES(1002, 0, A, A3);
INSERT INTO TEMP1 VALUES(1002, 0, B, B2);
INSERT INTO TEMP1 VALUES(1002, 0, E, E3);
INSERT INTO TEMP1 VALUES(1001, 1, A, A4);
INSERT INTO TEMP1 VALUES(1001, 1, E, E4);

Here based on latest revision and refid I should get the fieldnam and value.
Expected output:
REFID FIELDNAM VALUE REVISION
1001 A A4 1
1001 E E4 1
1002 B B2 0
1001 C C2 0

View Replies !
User Information Changed
The other day someone changed every user's password on my site. Then they changed every user's email address to theirs - I assume the reason was that when the user used the password reset function, they would never see the information.

I'm trying to research what/where the vulnerability is in the script that I'm suing, but I don't really know where to start - not being a hacker, I don't even know the terms to search for here or on google.

Is this what is meant by mysql injection?

View Replies !
Float(m,n) Changed Between Mysql 4.0 And 5.0?
I have a float(11,10) field (default NULL) in one of my MyISAM tables. With MySQL 4.0.16, I can call an Update/Insert query with a value of , say 33.166668 to this field, and it updates correctly. When I retrieve that value again with a select statement, I get something like 33.1666668392 (10 digits after decimal). Which is correct. (The sql_mode server variable is set to 0)

With the same field in MySQL 5.0, my experience is different. With the server sql_mode set to one of the strict values( SQL_TRANS_STRICT), i get an error about out of range value for the float field. when I change the sql_mode to not have the SQL_TRANS_STRICT, I get the same error as a warning, 1264 "Out of range...". When I retrieve this value, it is set to 10.0000000000, which is wrong. But , when I change the field description to float(11,5) and do an update, the value is updated right, but I get an intermittent "No rows updated" error.

Could anybody please explain if the float definitions changed between versions? Does float(m,n) now mean that I can have only (m-n) digits before decimal point?

View Replies !
Rows Changed In Update SQL
Is there a way to find out how many rows got updated when i execute a update stmt.

I would like to get the updated rows count in SQL.

Let me know and Thanks in advance.

update stmt where clause;

now how can i get the count of rows that got updated.

View Replies !
History Of Changed Percents
I have a table with data like that:

percent date
50% 2007-05-01
30% 2007-05-02
30% 2007-05-03
50% 2007-05-04
50% 2007-05-05
20% 2007-05-06
20% 2007-05-07
50% 2007-05-08
70% 2007-05-09
70% 2007-05-10

The query has to return this rows:

50% 2007-05-01
30% 2007-05-02
50% 2007-05-04
20% 2007-05-06
50% 2007-05-08
70% 2007-05-09

View Replies !
Changed Datadir Now Mysql Won't Run
I changed the datadir using mysql administrator (so I could "see it") (I'm using version 5.0.x under OS X 10.4.5 and now mysql won't run and I don't know how to reset the datadir. I've reinstalled mysql and when I try to run it this is what I get:

iBook-G4:/usr/local/mysql michael$ sudo ./bin/mysqld_safe &
[16] 12878
iBook-G4:/usr/local/mysql michael$ Starting mysqld daemon with databases from /Users/michael/Sites
STOPPING server from pid file /Users/michael/Sites/iBook-G4.pid
060329 12:38:24 mysqld ended

View Replies !
All Swedish Characters Is Changed
I'm doing Kevin Yanks tutorial about how to manage users with session (with some small modifications).

But when the data is inserted into the table all Swedish characters is changed to some strange "¥" and "¶". Why is it so and how to fix it?

According to PHPAdmin the collation is either UTF-8 (db) or Latin1_swedish (table)?

View Replies !
Changed Root Password, Now I Can't Do Anything
I am following the MySQL by Michael Kofler and looking at securing root access as currently it has no password.

I've logged into the MySQL consol and changed password using :

mysqladmin -u root -h localhost password XXX

However, i now can't do anything in in mysql terminal it comes back "access denied for user 'root'@'localhost' (using password :NO)

View Replies !
Date And Time Stamp A Changed Row
I am about to declare a table with 20 columns.

How do I create 4 more columns:
1. current Time
2. current Day of the month
3. current Month
4. current Year

Such that:

a. These 4 columns are not editable by the user.

b. Whenever a row is updated/inserted/replace/etc. then
these 4 columns in that row are automatically updated
by the system accordingly.

View Replies !
Datetime Field Changed After ALTER
To archive when a row is added, I have a column called date_added which uses the data type DATETIME.

I recently added a new column to my table "ALTER TABLE mytable ADD COLUMN mycolumn INT", and my stored dates have all been changed. In hindsight, was this to be expected?

I am using PHP to both push data into MySQL and pull data from MySQL. To prevent such future blunders, is it good practice to store dates as CHAR data type, and actively store the date using PHP?

View Replies !
Phone Numbers Changed On Import
I have imported a cvs data file every way I can think of and I always get this weird problem. About 75% of my 4,000 files end up with the phone number 2147483647. I searched the cvs file and this number does not exist there.
Is there an explaination for this?

View Replies !
Bug :: Floating Point Value 1.0 Changed To 1 When Inserting
when insert the floating point "1.0" in the tables, it is converted as "1" , is there anyway to store the exact floating point values?

my intention is to insert the values like "1.0" or "1.10" or "1.110" without any restriction.

description of the table is ...

View Replies !
Replication :: Master Log File Position Changed
I have a simple master/slave replication environment that is working smoothly with one exception. If I restart the master server the Master Log File is incremented by one (e.g. the original master log is named data-bin.000001 and the new master log is named data-bin.000002) the slave server never notices that the Master Log File and the Master Log Position have changed. Instead, the slave sits there waiting for new entries in the old Master Log File. I can tell this by executing a SHOW SLAVE STATUS on the slave server.

I am not sure about this because I can't find any documentation on the proper behavior of mysql during this scenario, however, I am under the impression that slave server should be able to figure this out and continue replicating, without requiring me to execute an "CHANGE MASTER..." command on the slave server every time the master is restarted. Of course, I assume this same problem will occur when the Master Log File grows to its maximum size and a new Master Log File is
created.

If anybody who has experience with mysql replication could just confirm that the behavior I am seeing is not correct, that would be great. Or if anybody has any suggestions as to what, if anything, is wrong with my setup. Code:

View Replies !
Row Cannot Be Located For Updating. Some Values Might Have Changed Since It Was Last Updated
I've recently migrated from access to mysql with vb6). Unfortunately, i get the following error whenever the .update is executed on the recordset.

"Row Cannot be located for updating. Some values might have changed since it was last updated"

The select statement is:
Select * from tablename, connection,3,3 (have also modified the 3,3, to be adOpenDynamic, adLockOptimistic)

I have tried checking the flag To Return Matching Rows, I've added the option = 2 in the connection string, i have a primary key field in the table, and I've also tried re-assigning it to itself.

View Replies !
Identify Columns Changed By Update Statement
It says in the documentation that "If you set a column to the value it currently has, MySQL notices this and does not update it." is there anyway to identify what column values have changed? i.e. what columns have been updated?

View Replies !
HostName Changed - Now MySql Server Wont Run
I've changed the hostname of my sever at long last, now what had been a very stable Mysql server won't run, can anyone point me in the right direction?

View Replies !
String Error - Quotes Changed To Question Marks
I recently converted an asp/access site to an asp/mysql site. Now all my strings are displaying funky. For example if I have the text - Why don't we say "Yipee" - it displays on my site as - Why don?t we say ?Yipee?. The same change is being made when I use a sentence with "..." in it. I like ... baseball is changed to - I like?baseball.

Any thoughts as to why this is happening? Sometimes it is actually being changed somehow in the database, and sometimes it is correct in the database, but then changed when it displays on the web.

View Replies !
Mysql Appears To Have Changed The 'password' Function Hashing
I've been using Mysql for about 6 months but in fairly basic fashion. For a cms I have built, I have a users table, with userName and password fields. An admin can create new users, and the password is hashed using the PASSWORD() function.
SQL: "INSERT INTO users VALUES ('', '$userName', PASSWORD('$userPwd'))

Straight out of the book basically. Now the problem is that all this has been functioning fine on a couple of sites on external servers, plus a couple of local machines.

Until today, on my main dev machine - yesterday a user could log in, today they couldn't. As far as I can tell, nothing has changed. But when I look at the hashes in the database table, they are 41 chrs, and when I add a new user, the hash is 16 characters.

I know that at some stage the hash length was increased between mysql versions, but I have not updated the install (I run XAMPP for Windows 1.4.14, which appears to install php 5.0.4 and mysql 4.1.12)

Is there any other reason that the hash length could change to 16? I'd like to know why this happened so that I'm prepared if it happens on the server (where it is not so easy to hack in and add new users that can log in again)

View Replies !
Given Field Name, Find Table That Has Tha Field Name?
Is there a quick way to identify tables that have a specific column in them? For example, if I have a column name 'RuleName', how can I need to find all the tables in a database that have a column with that name?

View Replies !
Restoring Database In A Changed Database
I have a database name 'rtdb1' with a table 'review_table'.

The 'review_table' has one column 'version' of varchar 20 type.

I took the mysqldump of the rtdb1 database.

Then I changed by table 'review_table' by adding one more column 'category' int type and called the database 'rtdb2'.

But when I restore my dump of 'rtdb1' database to 'rtdb2' database, I don't see the 'category' column.

View Replies !
Can't Find MYD
I cannot access any tables of a database which previously worked fine and suddenly broke.
I get Error 1017 errno: 2 from both mysqlcc 0.9.4 and mysqlc.
The system complains that it cannot find any of the .MYD files,
although they are clearly there. The file system is perfectly
analogous to other databases in the same tree which work ok.

I can write a program to recover the MYD files in plain text form
if I knew the file structure, but I can't figure it out.

View Replies !
Different Way To Find Min
I have the following query (courtesy ip2nation):

SELECT c.country
FROM ip2nationCountries c, ip2nation i
WHERE i.ip < INET_ATON('some.ip.address')
AND c.code = i.country
ORDER BY i.ip DESC
LIMIT 0,1

Given an ip address, it returns the country that has the closest ip to it.

Now, I need to join these 2 tables with a table (logs) which contains ips (FROM ip2nationCountries c, ip2nation i, logs l). If I simply replace "WHERE i.ip < INET_ATON(l.ip)", my query is messed up by the LIMIT statement, which will only return only one ip.

View Replies !
Find Row
how do you use the function: mysql_tell_row

I just get the error: Call to undefined function: mysql_tell_row()

View Replies !
Find All Possible Combinations Of A Set
For a match schedule I would like to find all possible combinations of
teams playing home and away (without teams playing to themselves of course).

I now the simple version works something like this:

For a (very) simple table containing three rows like this:

View Replies !
Find Value Not In Between Values.
I have a SQL question I am having trouble with. We have a table, with
a column that contains a code. These codes start at '00001', '00002',
'00003', '00004'... and so on. If the record containing '00003' as it's
code is deleted from the table, is there an SQL statement that can be
used to find the first missing record. I guess what we are looking for
is the lowest value of CODE not in the list of values between two
values, such as in the case '00001' to '99999'.

View Replies !

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