Sponsored Content
Top Forums Programming MySQL: Create a relation between two tables. Post 302492236 by Corona688 on Sunday 30th of January 2011 03:45:48 PM
Old 01-30-2011
Also, you have to use InnoDB tables to use features like foreign keys. Normal MyISAM tables won't do.
 

6 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

create 'day' tables based on timestamp in mysql

How would one go about creating 'day' tables based on the timestamp field. I have some 'import' tables which contains data from various days and would like to spilt that data up into 'days' based on the timestamp field in new tables. TABLE_IMPORT1 TABLE_IMPORT2 TABLE_IMPORT3 ... (2 Replies)
Discussion started by: hazno
2 Replies

2. Web Development

How do you sync tables in mysql between two different servers?

Hi all, I have 2 mysql databases running on two different servers (both can be accessed via ssh to each other). If I have say table ABC on server 1, how can I sync it with table ABC on server 2 if the number of records is different? Both databases are the same structure though server 2 has... (2 Replies)
Discussion started by: muay_tb
2 Replies

3. Programming

MySQL join four tables!

Hello; I want merge four MySQL tables to get the intersection that have a common field for all of them. Join two tables is fine to me, but my this case is different from common situations and there are not very many discussions about it. Can anybody give me some idea? Thanks a lot! Here is part... (8 Replies)
Discussion started by: yifangt
8 Replies

4. Shell Programming and Scripting

Show only new and removed records by comparing to MySQL tables

Hello all; I have been really frustrated with finding the correct perl code (and MySql statements) to accomplish what I thought was straight forward...I have tested I don't know how many different codes\suggestions I found on the net without any success...but anyhow let me explain my plight and... (0 Replies)
Discussion started by: gvolpini
0 Replies

5. Shell Programming and Scripting

UPDATE COmmand post comparing 2 columns in 2 mysql tables

my queryis : select distinct m.name, item_count, item from master m join client p on m.name=p.name where item_count = 1 and item > 1; But how should I update them? i used update statetment : Update from client Set item =1 where m.name=p.name and item_count=1 AND item>1 Is this wrong? (1 Reply)
Discussion started by: siya@
1 Replies

6. Shell Programming and Scripting

Shell script automation using cron which query's MySQL Tables

What I have: I have a input.sh (script which basically connect to mysql-db and query's multiple tables to write back the output to output1.out file in a directory) note: I need to pass an integer (unique_id = anything b/w 1- 1000) next to the script everytime I run the script which generates... (3 Replies)
Discussion started by: kkpand
3 Replies
mysqlaccess(1)							  MySQL database						    mysqlaccess(1)

NAME
mysqlaccess-Createnewuserstomysql. USAGE
mysqlaccess [host [user [db]]] OPTIONS SYNOPSIS
mysqlaccess [-?|--help] [-v|--version] [-p|--password=#] [-h|--host=#] [-d|--db=#] [-U|--superuser=#] [-P|--spassword=#] [-H|--rhost=#] [--old_server] [-b|--brief] [-t|--table] [--relnotes] [--plan] [--howto] [--debug=N] [--copy] [--preview] [--commit] [--rollback] DESCRIPTION
-?|--help display this helpscreen and exit -v|--version print information on the program `mysqlaccess' -u|--user=# username for logging in to the db -p|--password=# validate password for user -h|--host=# name or IP-number of the host -d|--db=# name of the database -U|--superuser=# connect as superuser -P|--spassword=# password for superuser -H|--rhost=# remote MySQL-server to connect to --old_server connect to old MySQL-server (before v3.21) which does not yet know how to handle full where clauses. -b|--brief single-line tabular report -t|--table report in table-format --relnotes print release-notes --plan print suggestions/ideas for future releases --howto some examples of how to run `mysqlaccess' --debug=N enter debuglevel N (0..3) --copy reload temporary grant-tables from original ones --preview show differences in privileges after making changes in (temporary) grant-tables --commit copy grant-rules from temporary tables to grant-tables (!don't forget to do an mysqladmin reload) --rollback undo the last changes to the grant-tables. NOTE
At least the user and the db must be given (even with wildcards) If no host is given, `localhost' is assumed Wildcards (*,?,%,_) are allowed for host, user and db, but be sure to escape them from your shell!! (i.e., type * or '*') SEE ALSO
isamchk(1), isamlog(1), mysql(1), mysqladmin(1), mysqld(1), mysqld_multi(1), mysqld_safe(1), mysqldump(1), mysql_fix_privilege_tables(1), mysqlshow(1), mysql_zap(1), perror(1), replace(1) For more information please refer to the MySQL reference manual, which may already be installed locally and which is also available online at http://www.mysql.com/doc/en/ BUGS
Please refer to http://bugs.mysql.com/ to report bugs. AUTHOR
Ver 1.0, distribution 4.0.24 Michael (Monty) Widenius (monty@mysql.com), MySQL AB (http://www.mysql.com/). This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (kill-9@kill-9.dk), Mercurmedia Data Model Architect / system developer (http://www.mercur- media.com) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+------------------------------------+ |Availability | SUNWmysqlr, SUNWmysqlu, SUNWmysqlt | +--------------------+------------------------------------+ |Interface Stability | External | +--------------------+------------------------------------+ NOTES
Source for mysql is available on http://opensolaris.org. MySQL 4.0 19 December 2000 mysqlaccess(1)
All times are GMT -4. The time now is 02:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy