Re: SQL Query help
>> This is probably tediously basic for all you super whiz > MySQL people > but help me out if you can. >> >> I have 2 tables in my database (there will be more) >> >> table_Applics & table_keywords >> >> I want to select columns of information from > table_applics based on the > ID results from table_keywords. something like this I guess, >> >> Select ID From Keywords Where markets = 'Financial' >> This then gives me a list of ID's which I then want to > take to > table_applics and get the row of information for each ID > number in the > list that exist >> >> Select ID,NAME,LNAME,ADDRESS1 from table_applics >> >> Whats the best way to achieve this in a single query ? >> >> can any one help me with the Logic !!! >> >> >> Here from you soon I hope, >> Best regards >> Andy Fletcher > > -- > You can try that: > I do not know if it is what you are looking for: > > > SELECT - FROM TABLE1 INNER JOIN TABLE2 USING > (common_column) GROUP BY -- ORDER BY ; > > Another way: > > SELECT - FROM TABLE1 INNER JOIN TABLE2 ON > table1.field=table2.field (field as common_column) GROUP > BY -- ORDER BY ; > > --- > > I hope that it works. > > Marcelo Araujo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Lost connection
Hi all During the update of the MySQL DB (delete/insert), I keep getting the following message Lost connection to MySQL server during query... Any thoughts about this issue, could it be a network, code or tunning problem ... Thanks
mysql-migration-toolkit
Am trying to install the following pack: [EMAIL PROTECTED] download]# rpm -Uvh mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm error: Failed dependencies: libjvm.so(SUNWprivate_1.1) is needed by mysql-migration-toolkit-5.0r12-1rhel4.i386 [EMAIL PROTECTED] download]# java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) [EMAIL PROTECTED] download]# locate libjvm.so /u01/oracle/10g/jdk/jre/lib/i386/client/libjvm.so /u01/oracle/10g/jdk/jre/lib/i386/server/libjvm.so /u01/oracle/10g/jre/1.4.2/lib/i386/client/libjvm.so /u01/oracle/10g/jre/1.4.2/lib/i386/server/libjvm.so /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/client/libjvm.so /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/server/libjvm.so /usr/lib64/gcj-4.1.1/libjvm.so [EMAIL PROTECTED] download]# [EMAIL PROTECTED] download]# uname -a Linux PowerEdge1 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:42:41 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux [EMAIL PROTECTED] download]# cat /etc/redhat-release redhat-4 #CentOS release 5.2 (Final) Any help how to get toolkit installed? -- Your search - madunix - did not match any documents.
Re: mysql-migration-toolkit
I did the following to resolve this issue [EMAIL PROTECTED] download]# rpm -Uvh mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm error: Failed dependencies: libjvm.so(SUNWprivate_1.1) is needed by mysql-migration-toolkit-5.0r12-1rhel4.i386 [EMAIL PROTECTED] download]# rpm -ivh --nodeps mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm Preparing...### [100%] 1:mysql-migration-toolkit### [100%] but when i run mysql-query-browser i see this (mysql-query-browser-bin:21015): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks", (mysql-query-browser-bin:21015): libglade-WARNING **: unknown property `urgency_hint' for class `GtkWindow' (mysql-query-browser-bin:21015): libglade-WARNING **: unknown property `pack_direction' for class `GtkMenuBar' (mysql-query-browser-bin:21015): libglade-WARNING **: unknown property `child_pack_direction' for class `GtkMenuBar' Any help... On Wed, Aug 20, 2008 at 4:32 PM, Mad Unix <[EMAIL PROTECTED]> wrote: > Am trying to install the following pack: > > [EMAIL PROTECTED] download]# rpm -Uvh > mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm > error: Failed dependencies: > libjvm.so(SUNWprivate_1.1) is needed by > mysql-migration-toolkit-5.0r12-1rhel4.i386 > [EMAIL PROTECTED] download]# java -version > java version "1.6.0_07" > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) > [EMAIL PROTECTED] download]# locate libjvm.so > /u01/oracle/10g/jdk/jre/lib/i386/client/libjvm.so > /u01/oracle/10g/jdk/jre/lib/i386/server/libjvm.so > /u01/oracle/10g/jre/1.4.2/lib/i386/client/libjvm.so > /u01/oracle/10g/jre/1.4.2/lib/i386/server/libjvm.so > /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/client/libjvm.so > /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/server/libjvm.so > /usr/lib64/gcj-4.1.1/libjvm.so > [EMAIL PROTECTED] download]# > > > [EMAIL PROTECTED] download]# uname -a > Linux PowerEdge1 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:42:41 EDT 2008 > x86_64 x86_64 x86_64 GNU/Linux > [EMAIL PROTECTED] download]# cat /etc/redhat-release > redhat-4 > #CentOS release 5.2 (Final) > > Any help how to get toolkit installed? > -- > Your search - madunix - did not match any documents. > -- Your search - madunix - did not match any documents.
Re: mysql-migration-toolkit
Am using the following packages -rw-r--r-- 1 root root 4117403 May 3 2007 mysql-administrator-5.0r12-1rhel4.i386.rpm -rw-r--r-- 1 root root310923 Aug 20 17:53 mysql-gui-tools-5.0r12-195.1.x86_64.rpm -rw-r--r-- 1 root root 6265000 May 3 2007 mysql-gui-tools-5.0r12-1rhel4.i386.rpm -rw-rw-r-- 1 pons pons 18576475 Aug 20 09:00 mysql-gui-tools-5.0r12-rhel4-i386.tar.gz -rw-r--r-- 1 root root 5247393 May 3 2007 mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm -rw-r--r-- 1 root root 3133875 May 3 2007 mysql-query-browser-5.0r12-1rhel4.i386.rpm On Wed, Aug 20, 2008 at 5:02 PM, Mad Unix <[EMAIL PROTECTED]> wrote: > I did the following to resolve this issue > [EMAIL PROTECTED] download]# rpm -Uvh > mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm > error: Failed dependencies: > libjvm.so(SUNWprivate_1.1) is needed by > mysql-migration-toolkit-5.0r12-1rhel4.i386 > [EMAIL PROTECTED] download]# rpm -ivh --nodeps > mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm > Preparing...### > [100%] >1:mysql-migration-toolkit### > [100%] > > but when i run mysql-query-browser i see this > > (mysql-query-browser-bin:21015): Gtk-WARNING **: Unable to locate theme > engine in module_path: "clearlooks", > > (mysql-query-browser-bin:21015): libglade-WARNING **: unknown property > `urgency_hint' for class `GtkWindow' > > (mysql-query-browser-bin:21015): libglade-WARNING **: unknown property > `pack_direction' for class `GtkMenuBar' > > (mysql-query-browser-bin:21015): libglade-WARNING **: unknown property > `child_pack_direction' for class `GtkMenuBar' > > > Any help... > > > On Wed, Aug 20, 2008 at 4:32 PM, Mad Unix <[EMAIL PROTECTED]> wrote: > >> Am trying to install the following pack: >> >> [EMAIL PROTECTED] download]# rpm -Uvh >> mysql-migration-toolkit-5.0r12-1rhel4.i386.rpm >> error: Failed dependencies: >> libjvm.so(SUNWprivate_1.1) is needed by >> mysql-migration-toolkit-5.0r12-1rhel4.i386 >> [EMAIL PROTECTED] download]# java -version >> java version "1.6.0_07" >> Java(TM) SE Runtime Environment (build 1.6.0_07-b06) >> Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) >> [EMAIL PROTECTED] download]# locate libjvm.so >> /u01/oracle/10g/jdk/jre/lib/i386/client/libjvm.so >> /u01/oracle/10g/jdk/jre/lib/i386/server/libjvm.so >> /u01/oracle/10g/jre/1.4.2/lib/i386/client/libjvm.so >> /u01/oracle/10g/jre/1.4.2/lib/i386/server/libjvm.so >> /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/client/libjvm.so >> /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/server/libjvm.so >> /usr/lib64/gcj-4.1.1/libjvm.so >> [EMAIL PROTECTED] download]# >> >> >> [EMAIL PROTECTED] download]# uname -a >> Linux PowerEdge1 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:42:41 EDT 2008 >> x86_64 x86_64 x86_64 GNU/Linux >> [EMAIL PROTECTED] download]# cat /etc/redhat-release >> redhat-4 >> #CentOS release 5.2 (Final) >> >> Any help how to get toolkit installed? >> -- >> Your search - madunix - did not match any documents. >> > > > > -- > Your search - madunix - did not match any documents. > -- Your search - madunix - did not match any documents.
sync
I was wandering if anyone know a good way to sync 2mysql databases _one_way The mysql is alocated on a web php application. Thanks -- Madunix_at_Gmail Sysadmin "Computers are useless. They can only give you answers" - Pablo Picasso "Never trust a computer you can't throw out a window." - Steve Wozniak
Re: sync
yes, they should be identical , am thinking to use the howtoforge mysql_database_replication document. On Mon, Sep 1, 2008 at 4:58 PM, Ranjeet Walunj <[EMAIL PROTECTED]>wrote: > Mad Unix wrote: > >> I was wandering if anyone know a good way to sync 2mysql databases >> _one_way >> The mysql is alocated on a web php application >> > Do they (DB) need to be identical ? Have you checked replication ? > > Regards, > Ranjeet Walunj > > > -- Madunix_at_Gmail Sysadmin "Computers are useless. They can only give you answers" - Pablo Picasso "Never trust a computer you can't throw out a window." - Steve Wozniak
Re: MYSQL DB BACKUP
Any one tried the script from HowToForge http://www.howtoforge.com/shell-script-to-back-up-all-mysql-databases-each-table-in-an-individual-file-and-upload-to-remote-ftp #!/bin/sh # System + MySQL backup script # Copyright (c) 2008 Marchost # This script is licensed under GNU GPL version 2.0 or above # - # ##TO BE MODIFIED# ### System Setup ### BACKUP=YOUR_LOCAL_BACKUP_DIR ### MySQL Setup ### MUSER="MYSQL_USER" MPASS="MYSQL_USER_PASSWORD" MHOST="localhost" ### FTP server Setup ### FTPD="YOUR_FTP_BACKUP_DIR" FTPU="YOUR_FTP_USER" FTPP="YOUR_FTP_USER_PASSWORD" FTPS="YOUR_FTP_SERVER_ADDRESS" ##DO NOT MAKE MODIFICATION BELOW# # ### Binaries ### TAR="$(which tar)" GZIP="$(which gzip)" FTP="$(which ftp)" MYSQL="$(which mysql)" MYSQLDUMP="$(which mysqldump)" ### Today + hour in 24h format ### NOW=$(date +"%d%H") ### Create hourly dir ### mkdir $BACKUP/$NOW ### Get all databases name ### DBS="$($MYSQL -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')" for db in $DBS do ### Create dir for each databases, backup tables in individual files ### mkdir $BACKUP/$NOW/$db for i in `echo "show tables" | $MYSQL -u $MUSER -h $MHOST -p$MPASS $db|grep -v Tables_in_`; do FILE=$BACKUP/$NOW/$db/$i.sql.gz echo $i; $MYSQLDUMP --add-drop-table --allow-keywords -q -c -u $MUSER -h $MHOST -p$MPASS $db $i | $GZIP -9 > $FILE done done ### Compress all tables in one nice file to upload ### ARCHIVE=$BACKUP/$NOW.tar.gz ARCHIVED=$BACKUP/$NOW $TAR -cvf $ARCHIVE $ARCHIVED ### Dump backup using FTP ### cd $BACKUP DUMPFILE=$NOW.tar.gz $FTP -n $FTPS < wrote: > Thanks a lot. > > I am writing script which will take backup and copy it to another box. > > On Wed, Sep 17, 2008 at 11:14 AM, Ananda Kumar <[EMAIL PROTECTED]> wrote: > >> Can u mount that file system on the slave db and take the backup so that u >> can avoid Network latency. >> >> regards >> anandkl >> >> >> On 9/16/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: >>> >>> Yes >>> >>> On Tue, Sep 16, 2008 at 6:39 PM, Ananda Kumar <[EMAIL PROTECTED]> wrote: >>> Hi Krishna, When u say remote server, do u mean the file system storing the backup is on a different machine. regards anandkl On 9/16/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > > Hi, > > Currently, i am taking production server backup on hourly basis on the > slave > server. Is it feasible to take 15G backup on remote server on hourly > basis. > It takes 10 minutes on slave server. How much time it will take on > remote > server. > > Thanks, > -- > Krishna Chandra Prajapati > >>> >>> >>> >>> -- >>> Krishna Chandra Prajapati >>> >>> >>> >> >> > > > -- > Krishna Chandra Prajapati > MySQL DBA, > Ed Ventures e-Learning Pvt.Ltd. > 1-8-303/48/15, Sindhi Colony > P.G.Road, Secunderabad. > Pin Code: 53 > Office Number: 040-66489771 > Mob: 9912924044 > URL: ed-ventures-online.com > Email-id: [EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Mysql users setup.
Hello all! I am just starting out with learning mysql and I have run into some speed bumps that are mostly my configuration. I have set up mysql running on a Mac OS X box with php running a particular software package called phpESP. Works great (a bit slow, but great). Now, in order to have my system go live the head honchos decided that my department could not have the mysql database and the webserver on thes same machine (security reasons). Now I have read some of the docs regarding doing this, whatever user accesses the database has to have the IP that it will be coming from set up after the @ symbol. Well, can I change an existing user to have access from any location, and how would I see if that is already set up for this user? Sorry for the newbie questions, but docs, urls, or pretty much anything will get me started thanks so much! Terry. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Mysql users setup.
Thanks for the quick reply Simon! I checked in the file, and just as you said the info was there. No, I actually solved the problem myself shortly after setting up phpMyAdmin from sourceforge.net Top notch little software package there(free too)! For newbies like me, it works out great, hopefully in a few weeks I'll be much more well versed. Again, really appreciate know the 'real way' to do it! Have a great one! Terry On Wed, 2002-04-24 at 03:18, Simon Green wrote: > Look in db mysql.user to see what users can do what. > GRANT ALL ON *.* TO user@% IDENTIFIED BY "password"; > Simon > > -Original Message- > From: Unix Newbie [mailto:[EMAIL PROTECTED]] > Sent: 24 April 2002 10:15 > To: [EMAIL PROTECTED] > Subject: Mysql users setup. > > > > > Hello all! > >I am just starting out with learning mysql and I have run into some > speed bumps that are mostly my configuration. I have set up mysql > running on a Mac OS X box with php running a particular software package > called phpESP. Works great (a bit slow, but great). > > Now, in order to have my system go live the head honchos decided that > my department could not have the mysql database and the webserver on > thes same machine (security reasons). Now I have read some of the docs > regarding doing this, whatever user accesses the database has to have > the IP that it will be coming from set up after the @ symbol. Well, can > I change an existing user to have access from any location, and how > would I see if that is already set up for this user? > > > Sorry for the newbie questions, but docs, urls, or pretty much > anything will get me started thanks so much! > >Terry. > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php