Update one field with more fields from another table

2004-03-12 Thread Wouter Coppieters
Dear mysql user I found this example in the doc of mysql. I have a similar problem. Is there any solution to this? Thanks Update one field with more fields from another table Table A ++---+ | A-num | text | |1 | | |2 | | |3 |

Re: Uninstall MySQL for Panther?

2004-03-12 Thread Scott Haneda
on 03/12/2004 09:31 PM, John Mistler at [EMAIL PROTECTED] wrote: > First I want to thank all of you guys for responding. I feel a new sense of > confidence that I will be able to get this thing going! > > However, my problems have compounded. We now have a new problem. I took > the advice of o

List of fields

2004-03-12 Thread Scott Haneda
describe table; almost does what I need, how would I get a nice clean unformed list back, perhaps \r\n separated. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Fax: 313.557.

Re: Problem selecting from 3 tables

2004-03-12 Thread Peter Brawley
>I'm having trouble with sql statement to select from 3 tables. >The first column is in ProductsPics and the rest in Products. >(qq{SELECT PictureName, ProdName, Description, SalesPrice FROM Products >INNER JOIN >ProdCategory USING(CategoryNr) INNER JOIN ProductsPics >USING(ProdNr) WHE

Re: Backward compatable?

2004-03-12 Thread Mulugeta Maru
I was ignorant. The information is readily available at MySQL site. >mysqldump -u root -p --opt accounting Thank you for your help. - Original Message - From: "Daniel Kasak" <[EMAIL PROTECTED]> To: "Mulugeta Maru" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Friday, March 12,

Re: Uninstall MySQL for Panther?

2004-03-12 Thread John Mistler
First I want to thank all of you guys for responding. I feel a new sense of confidence that I will be able to get this thing going! However, my problems have compounded. We now have a new problem. I took the advice of one archived postings and dragged the four files seemingly installed by the m

Problem selecting from 3 tables

2004-03-12 Thread B. Fongo
I'm having trouble with sql statement to select from 3 tables. The first column is in ProductsPics and the rest in Products. (qq{SELECT PictureName, ProdName, Description, SalesPrice FROM Products INNER JOIN ProdCategory USING(CategoryNr) INNER JOIN ProductsPics USING(ProdNr) WHERE

re: Union Query Sorting

2004-03-12 Thread Jeremy March
> Can anyone tell me how to sort the combined results of a Union query? > > (Select Name From Employee Group By Name Order By Name) > Union (Select Name From Consultant Group By Name Order By Name); > Just add another order by on the end after the parenthesis: (Select Name From Employee Group B

re: utf8 - left function

2004-03-12 Thread Jeremy March
> Hi, > > I need this query; > > SELECT LEFT(FieldName, 1) AS FirstLetter, COUNT(*) FROM TableName > GROUP BY FirstLetter > > my datas in utf8 format. I can't get first characters of the datas in > utf8 format but others is ok. > > Any suggestion? > > Thank you It works for me. I'm using the

Re: Backward compatable?

2004-03-12 Thread Daniel Kasak
Mulugeta Maru wrote: I am using MySQL 5.0 at the moment with a number of databases. These databases are created to learn MySQL. Some of the tables are Innodb. I would like to remove MySQL 5.0 and install 4.0.18. What do I need to do to reserve the databases so that I can continue to use them in 4

Union Query Sorting

2004-03-12 Thread Ed Reed
Can anyone tell me how to sort the combined results of a Union query? Right now I have a Group By and Order By in both of my queries that make up my Union but the results are grouped and sorted within the two queries but not between the two queries. The example below demonstrates my problem. In the

Re: Uninstall MySQL for Panther?

2004-03-12 Thread Paul DuBois
At 18:33 -0800 3/12/04, John Mistler wrote: I am two days into troubleshooting this. I need some help badly. I installed MySQL 4.0.18 for Mac. I was able to get in at first: Welcome to MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 4.0.18-standard P

Re: Uninstall MySQL for Panther?

2004-03-12 Thread Hassan Schroeder
John Mistler wrote: I installed MySQL 4.0.18 for Mac. I was able to get in at first: I tried all kinds of commands to change the root password, and every single one would result in "Access denied for user . . . " I would like to install, instead, CompleteMySQL from the serverlogisitics.com site,

Uninstall MySQL for Panther?

2004-03-12 Thread John Mistler
I am two days into troubleshooting this. I need some help badly. I installed MySQL 4.0.18 for Mac. I was able to get in at first: Welcome to MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 4.0.18-standard then I would type mysql> create database myt

Backward compatable?

2004-03-12 Thread Mulugeta Maru
I am using MySQL 5.0 at the moment with a number of databases. These databases are created to learn MySQL. Some of the tables are Innodb. I would like to remove MySQL 5.0 and install 4.0.18. What do I need to do to reserve the databases so that I can continue to use them in 4.0.18. Thank you.

Re: Security

2004-03-12 Thread Mulugeta Maru
Thank you very much. Makes sense. - Original Message - From: "Curtis Maurand" <[EMAIL PROTECTED]> To: "Mulugeta Maru" <[EMAIL PROTECTED]> Cc: "Mike Johnson" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Friday, March 12, 2004 1:17 PM Subject: Re: Security > > Usernames, passwor

utf8 - left function

2004-03-12 Thread silk
Hi, I need this query; SELECT LEFT(FieldName, 1) AS FirstLetter, COUNT(*) FROM TableName GROUP BY FirstLetter my datas in utf8 format. I can't get first characters of the datas in utf8 format but others is ok. Any suggestion? Thank you

mysql error grant tables, help

2004-03-12 Thread Chris Sanchez
get this when i run scripts/mysql_install_db. also tried mysqld --skip-grant and got the same thing. how do i fix? mysql-standard-4.0.18-sun-solaris2.8-sparc binary on SunOS ipdev1 5.8 Generic_108528-06 sun4u sparc SUNW,Ultra-5_10. [EMAIL PROTECTED]:/usr/local/mysql $ scripts/mysql_install_db Prep

Re: Query with IF acting wierd.

2004-03-12 Thread Michael Stassen
Mike Johnson wrote: From: Mike Johnson SELECT main.id, IF(main.type,categories.name,items.name), IF(main.type,"cat","item") AS type FROM main, IF(main.type,items,categories) WHERE IF(main.type,categories.id,items.id)=main.id; Oh, my mistake. I just realized I reversed items and categories in

Odd Table locking issue

2004-03-12 Thread mysql
If you've read my last email, you know what the problem is, but I have now pinpointed it a bit further using the processlist feature. [EMAIL PROTECTED] MBPlatforms]# mysqladmin -v processlist -p Enter password: +-+--+---+-+-+--++-

RE: General Help - ERROR 1045: Access denied for user: 'ackerley@localhost'

2004-03-12 Thread J.R. Bullington
Then like Richard Davey sent earlier to the list, try: shell> mysql -u root If you haven't created the users yet with the mysql tool, then your user won't have access to it. First, change the root password using: shell> mysqladmin -u root password 'new_password' Then log into mysql and use: mysql

Re: Saving file into database

2004-03-12 Thread colbey
On Fri, 12 Mar 2004, Jigal van Hemert wrote: > I've been reading this thread, but I can't see the advantages of storing > files in a database. > I've always had the impression that a *file* system was the appropriate > place to store files. Scalability, searching, security.. just a few.. > Rep

RE: General Help - ERROR 1045: Access denied for user: 'ackerley@localhost'

2004-03-12 Thread J.R. Bullington
Is this user a super user, or do they only have access to a single DB? If they are a super user, try changing the password using mysqladmin -u ackerley password 'newpassword' If this user only has access to a single db, alter your mysql command to: shell> mysql -u ackerley -p 'database_name' J.

Re: General Help - ERROR 1045: Access denied for user: 'ackerley@localhost'

2004-03-12 Thread Richard Davey
Hello Rob, Friday, March 12, 2004, 7:39:47 PM, you wrote: RA> ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' > Does that user actually exist within MySQL? I have you used the mysqladmin program and created a user account called ackerley? If not, that's why you can't get in. Try using "

General Help - ERROR 1045: Access denied for user: 'ackerley@localhost'

2004-03-12 Thread Rob Ackerley
Can someone please help me sort this out. System info: Windows XP Apache Server Situation: I have done a fresh install of MySQL 4.0.18 using the windows installer. Everything seems to go fine. I execute the WinMySQLAdmin and it prompts me for a user name and password. I enter this inf

Re: Security

2004-03-12 Thread Curtis Maurand
Usernames, passwords, and then perform the queries select ... where customerid = "" Its all handled by your app. Curtis On Wed, 10 Mar 2004, Mulugeta Maru wrote: > Hi Mike, > > I am sorry for the confusion I might have caused. May be it would help to > give a clear example. > > Table - Cust

Re: link error gcc compiling mysql on solaris 9 (lib not found)

2004-03-12 Thread Ken Menzel
OK, sorry to answer my own post, libgcc was is /usr/local/lib which did not get properl added with crle! crle -u -l /usr/local/lib Problem gone! Sorry to waste bandwidth (we are just learning solaris!). Ken - Original Message - From: "Ken Menzel" <[EMAIL PROTECTED]> To: "Sasha Pachev

Re: two masters, one slave

2004-03-12 Thread Ken Menzel
Not at this time, however you could have two different slaves on the same physical server using mysql_mutli type of configuration. http://www.mysql.com/doc/en/mysqld_multi.html Hope it helps Ken - Original Message - From: "Ari Davidow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Fr

RE: two masters, one slave

2004-03-12 Thread Victor Pendleton
A slave can connect to only one master. -Original Message- From: Ari Davidow To: [EMAIL PROTECTED] Sent: 3/12/04 12:30 PM Subject: two masters, one slave Is it possible to have two masters and one slave? I'm trying to replicate two master databases so that I have a failover. The alterna

two masters, one slave

2004-03-12 Thread Ari Davidow
Is it possible to have two masters and one slave? I'm trying to replicate two master databases so that I have a failover. The alternate, I guess, would be to have two instances of mysql listing on different ports on the slave server platform? ari Ari Davidow [EMAIL PROTECTED] http://www.ivrity

Slow query with like clause (repost)

2004-03-12 Thread Bryan Coon
Posted this yesterday, but it never showed up...? Hi, I have the following table (sorry if the formatting gets tweaked) and query. The table is around 36k rows long, and the query returns about 350 rows. The query takes 12.15 seconds. Is there any way I can speed this up? Thanks, Bryan mys

MySQL Unicode Data and C API

2004-03-12 Thread Karam Chand
Hello, >From MySQL 4.1, MySQL supports storing of data in utf-8 and ucs2. But all the C API till supports only char*. This has brought up some issues in my mind: 1.) How do you I send Unicode data to MySQL server using C API()? Should I convert the query to utf-8 or double byte etc.? 2.) How a

Auditing

2004-03-12 Thread Dan Vande More
I'd like to be able to audit connections to mysql databases. Here is what I'd like to see: Who connected to the server. What IP did they come from. When they disconnected. Any permission denied errors they may have had. The only thing that comes close to that is the general log, which is quite a

Can table structure cause table corruption?

2004-03-12 Thread mysql
I am having some problems with constant table corruption on a database. I have now had this occur on two different operating systems with two different versions of MySQL. I edit these tables using Phpmyadmin (again two different version) and eventually, either after 1-5 actions, the table gets co

Re: mysql-4.0.18 build problem in FreeBSD-5.2-CURRENT

2004-03-12 Thread Ken Menzel
Hi Ganbold, I think you are asking in the wrong place. I would suggest [EMAIL PROTECTED] or [EMAIL PROTECTED] or [EMAIL PROTECTED] see . But my personal thoughts on this is if you are not ready for these types of issues don't track freebsd-current. This is bleeding edge stuff. FreeBSD-stable

DB init script problem with Grant statements

2004-03-12 Thread Kevin Hanser
Hello, I am having a weird problem with some sql that is supposed to set up a DB for me. When I run the .sql file manually from the command line like this: mysql --user=root < DB_init.sql It works fine. But when I do the same command from a shell script that is run during the kickstart setup

Re: How to minimize Master-Slave Traffic during replication <- Activating slave_compressed_protocol question

2004-03-12 Thread Lutz Maibach
Hello Sasha, thanks for your advise, but I'm not shure whether I understand how to find out if the master is offering (and using) the compressed protocol. When I execute the strings-command, I get can see the string "slave_compressed_protocol" two times, which I expected running 4.0.18, but if I d

Re: query reference help

2004-03-12 Thread kris burford
SELECT i.id, i.image_name, i.image_width, i.image_height, s.id as story_id, s.title FROM images i LEFT JOIN stories s ON s.body like '[img]' + i.image_name + '[/img]' WHERE i.image_name like '%$search%' ORDER by i.image_name peter wrote: Is ...LIKE '%[img]' + i.image_name + '[/i

Re: shorten SELECT query

2004-03-12 Thread Peter Brawley
Do you need something like ... SELECT tour.id, tour.showid, tour.date, tour.status, stat.id, stat.statusmesg FROM tour INNER JOIN stat USING (id) WHERE tour.date>$daysInMonths AND tour.date<$enddate AND tour.ontheroad=0 ORDER BY tour.date ASC; ? PB - Original Mes

Re: query reference help

2004-03-12 Thread Peter Brawley
Sorry, my mistake, I think you need CONCAT( '%[img]', i.image_name, '[/img]%' ) PB - Original Message - From: kris burford To: Peter Brawley ; [EMAIL PROTECTED] Sent: Friday, March 12, 2004 8:06 AM Subject: Re: query reference help > SELECT i.id, i.image_name, i.image_wi

Perfomance issues

2004-03-12 Thread "Chinchilla Zúñiga, Guillermo"
Hi folks: I would like to know if there are a perfomance loss using PEAR DB comparing with PHP native Mysql functions, and if this is a significant issue. Also I´m wondering if using persistent connections in PHP could lead to have many connections at the same time slowing the server, and how t

Re: link error gcc compiling mysql on solaris 9 (lib not found)

2004-03-12 Thread Ken Menzel
> > That's a mess of a problem. If the libraries were included in the link, > configure must have detected them on your system somehow, but now they are not > working. Did you by any chance use --with-mysqld-ldflags=-all-static ? > Yes I did, now I realize this doesn't work on Solaris. I tried li

shorten SELECT query

2004-03-12 Thread stuff
Hi, I have multiple queries nested inside each other and was wondering, if there is a way to shorten this thing, e.g. run it within a single query with subqueries? I couldn't find anything in the subquery section of the docs or maybe I just don't know how to put it. At the moment my code fragment

Re: auto_increment id

2004-03-12 Thread Rocar Peças
Mrs Reznichenko, About the ID problem, I´d create a single table just for ID´s (and ´d keep it as thin as possible). This would avoid the repeating id numbers. Sincerely Leandro da Rocar. <[EMAIL PROTECTED]> - Original Message - From: "Victoria Reznichenko" <[EMAIL PROTECTED]> To: <[

Re: MySql

2004-03-12 Thread Arunachalam
hi, When using MyISAM table, the limit will be determined by your operating system, ie. the number of files you can have in one directory. Using InnoDB tables removes that limitation by allowing multiple tables within a single datafile (tablespace). The maximum tablespace size is 4 billion dat

Re: Load data + odbc

2004-03-12 Thread Carl Karsten
> > > The first test i've done was on, lets say, BoxA and it worked just fine. > > > Than, i said,'ok, lets install the client on another WKS' that is BoxB. > And > > > from BoxB it's not working. > > > > > > > > I've got 2 workstations and a server on which i have Mysql 3.23.52 - > nt. > > > > > >

Re: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

2004-03-12 Thread Victor Medina
Hi! You seems to have just installed mysql. The root user should be able to acces a mysql server from anywhere by default. I don't know why you can connect from localhost, probably you delete the "[EMAIL PROTECTED]"? Anyway it is a good thing to delete the root user after the initial setup, once y

Re: Using OR

2004-03-12 Thread Johan Hook
Hi Keith, you can use: pla.type IN ('1','2','3','4'); /Johan Keith wrote: is there any alternative to using OR for selecting between values? ie: pla.type='1' OR pla.type='2' OR pla.type='3' OR pla.type='4' Cheers, Keith -- Johan Höök, Pythagoras Engineering Group - MailTo:[EMA

Re: Using OR

2004-03-12 Thread Alan Williamson
Keith wrote: is there any alternative to using OR for selecting between values? ie: pla.type='1' OR pla.type='2' OR pla.type='3' OR pla.type='4' Keith for stuff like this i try and arrange things in numerical blocks so i am doing selects like pla.type >= 1 AND play.type <= 4, probably not need

Using OR

2004-03-12 Thread Keith
is there any alternative to using OR for selecting between values? ie: pla.type='1' OR pla.type='2' OR pla.type='3' OR pla.type='4' Cheers, Keith

Re: query reference help

2004-03-12 Thread Peter Brawley
Kris, Is ...LIKE '%[img]' + i.image_name + '[/img]%' what you're looking for? PB - Original Message - From: Kris Burford To: [EMAIL PROTECTED] Sent: Friday, March 12, 2004 7:03 AM Subject: query reference help hi i'm having problems trying to write a query that retu

ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

2004-03-12 Thread Leslie Vance
Hello, I am having a hard time getting Mysql to let [EMAIL PROTECTED] connect. I am constantly getting this: ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) when I issue mysql -u root I can log in if I use mysql -h 192.168.1.10 -u root mysql I guess I have some so

Re: mysqld don't start

2004-03-12 Thread Egor Egorov
Pedro Baquero <[EMAIL PROTECTED]> wrote: > I installed mysql under RedHat 9 with > mysql-standard-4.1.1-alpha-pc-linux-i686.tar.gz but when I try to start the mysqld > with the sentence "./bin/mysqld_safe &" it gives me this message: > > [EMAIL PROTECTED] mysql]# ./bin/mysqld_safe & > [1] 2341

Re: New Prepared Statements !!!!!

2004-03-12 Thread Arunachalam
Sorry to all, I found that these API are renamed in next release of 4.1.2 (not yet released) from the URL: http://www.mysql.com/doc/en/News-4.1.2.html But i could not able to use properly the existing prepared statements API, When I use it it'll excute the statements as such and made updation t

Re: New Prepared Statements !!!!!

2004-03-12 Thread Victoria Reznichenko
Arunachalam <[EMAIL PROTECTED]> wrote: > > I am really astonishing when I see the sample > program on the URL: > http://www.mysql.com/doc/en/mysql_stmt_execute.html > > I am using > MySQL 5.0.0 alpha > Windows 2000 SP 4 > VC++ 6.0 > > I found that the C API changes as > mysql_prepare()

query reference help

2004-03-12 Thread Kris Burford
hi i'm having problems trying to write a query that returns a list of images and the stories (if any) that they're associated with. in this case, the story references the image embedded into the story body text in the format [img]myimage.jpg[/img] SELECT i.id, i.image_name, i.image_width, i.im

Re: Privilege to single database being revoked occasionally

2004-03-12 Thread Victoria Reznichenko
"Terence" <[EMAIL PROTECTED]> wrote: > Dear Lists, > > We moved to 4.1.0 when it was first launched, and twice a month or so, we > get access denied commands to one particular database for one particular > user. The privileges are correctly set, and the only way to restore access > for the user, i

mysqld don't start

2004-03-12 Thread Pedro Baquero
I installed mysql under RedHat 9 with mysql-standard-4.1.1-alpha-pc-linux-i686.tar.gz but when I try to start the mysqld with the sentence "./bin/mysqld_safe &" it gives me this message: [EMAIL PROTECTED] mysql]# ./bin/mysqld_safe & [1] 2341 [EMAIL PROTECTED] mysql]# Starting mysqld daemon wit

Re: auto_increment id

2004-03-12 Thread Victoria Reznichenko
"Stefan Schuster" <[EMAIL PROTECTED]> wrote: >> "Stefan Schuster" <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> I have a question about auto_increment: >>> >>> I have 2 tables, on of them holds my "online transactions", the other >>> one the "offline transactions". Every transaction is created in the

Re: BLOB, SUBSTRING and 65536 characters limit

2004-03-12 Thread Tomas Zvala
I'm sorry, the problem was of course between keyboard and chair. I didn't realize I'm using BLOB which is limited to 65536 characters insted of longblob that is quite larger. Thanks for your answers. Tomas Tomas Zvala wrote: Hello, I run into a problem where I need to get contents of BLOB to

Re: Maximum Database size

2004-03-12 Thread Alex Greg
> Stefan, > > it depends ... > > For MyISAM tables max size is limited by the maximum filesize of your > OS/Filesystem. Following on from that, the maximum file size you can have on 32-bit Linux is 2GB, unless your distro has LFS (Large File Support), in which case is is much larger (terabytes, n

Re: Maximum Database size

2004-03-12 Thread Thomas Spahni
Stefan, it depends ... For MyISAM tables max size is limited by the maximum filesize of your OS/Filesystem. Regards, Thomas On Fri, 12 Mar 2004, Baum, Stefan wrote: > Hi, > > I'm planning to use MySQL for logging from an SMTP-Relay. > What is the maximum size of the database, that can be re

Re: SELECT ... UPDATE

2004-03-12 Thread Victoria Reznichenko
"Darran Kartaschew" <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > Is there an easy way to update a field for the last record referenced by > an ID number? where that ID number is used on multiple rows? > > At the moment I am doing this which works: > > CREATE TEMPORARY TABLE tmp_user ( SELECT u

Re: Maximum Database size

2004-03-12 Thread Egor Egorov
"Baum, Stefan" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm planning to use MySQL for logging from an SMTP-Relay. > What is the maximum size of the database, that can be reached? > Table size (for MyISAM/ISAM tables) and number of tables per database is limited by your filesystem. -- For techn

New Prepared Statements !!!!!

2004-03-12 Thread Arunachalam
Hi, I am really astonishing when I see the sample program on the URL: http://www.mysql.com/doc/en/mysql_stmt_execute.html I am using MySQL 5.0.0 alpha Windows 2000 SP 4 VC++ 6.0 I found that the C API changes as mysql_prepare() ---> mysql_stmt_prepare() mysql_bind_param() --->

Determining when slave has synchronized.

2004-03-12 Thread Ian van der Neut
Hello all, Is there a scriptable way to determine if a slave in a replication setup has been fully synchronized with its master? Kind of like the following: echo "SHOW SLAVE STATUS" | mysql -u root | awk -f somescript.awk I'm not asking you to write the awk script for me ;) Just would like to k

Maximum Database size

2004-03-12 Thread Baum, Stefan
Hi, I'm planning to use MySQL for logging from an SMTP-Relay. What is the maximum size of the database, that can be reached? Stefan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Saving file into database

2004-03-12 Thread Jigal van Hemert
I've been reading this thread, but I can't see the advantages of storing files in a database. I've always had the impression that a *file* system was the appropriate place to store files. Access can be arranged easily by other means. Replication seems more silly, since one also copies the stored