Re: mysql and php

2005-05-29 Thread Michael Stassen
You haven't given us much to go on, other than it doesn't work, which isn't really helpful. We can't give you specific ideas where to look until you give us specific details of what's wrong. Please describe what happens. Do you get an error message? What is it? While you're at it, show us

Re: basic sql join question...

2005-05-29 Thread Jochem van Dieten
On 5/29/05, Philip George [EMAIL PROTECTED] wrote: +--++---+--+ | quantity | name | price | subtotal | +--++---+--+ |1 | orange | 0.97 | 0.97 | |3 | pear | 1.09 | 3.27 |

Re: update / subquery

2005-05-29 Thread Jochem van Dieten
On 5/29/05, Lieven De Keyzer wrote: From: Chris Lieven De Keyzer wrote: UPDATE account SET role_id = (SELECT role_id FROM role WHERE rolename = admin) WHERE username = test This gives me an: ERROR 1064 (0): You have an error in your SQL syntax. Check the manual that corresponds to

Re: basic sql join question...

2005-05-29 Thread Philip George
On May 29, 2005, at 1:41 AM, Jochem van Dieten wrote: http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html already read that. the join in my example is more complicated than anything depicted on that page. please explain. - philip -- MySQL General Mailing List For list

Re: performance on single column index with few distinct values

2005-05-29 Thread Jochem van Dieten
On 5/28/05, Terence wrote: Master ID is used to distinguish multiple helpdesks. In this table there are 100k records, but only 10 distinct master_id's. ticket_id master_id 1 1 2 1 3 2 4 2 5 3 ... ...

Re: basic sql join question...

2005-05-29 Thread Jochem van Dieten
On 5/29/05, Philip George wrote: On May 29, 2005, at 1:41 AM, Jochem van Dieten wrote: http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html already read that. the join in my example is more complicated than anything depicted on that page. The join is irrelevant. Your join returns a

Re: basic sql join question...

2005-05-29 Thread Philip George
http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html already read that. the join in my example is more complicated than anything depicted on that page. please explain. actually i should say that there are no examples of SUM() or AVG() -- or any of the other GROUP BY functions --

Re: basic sql join question...

2005-05-29 Thread Philip George
The join is irrelevant. Your join returns a resultset and you can just pretent that resultset is a single table: SELECT field1, field2, field3 FROM (very complicated join) AS simpletable GROUP BY ... WITH ROLLUP Just copy-pate your join into this and fix the fieldnames. aaahhh okay, i'm

Re: basic sql join question...

2005-05-29 Thread Jochem van Dieten
On 5/29/05, Philip George wrote: On 5/29/05, Philip George wrote: On 5/29/05, Jochem van Dieten wrote: http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html already read that. the join in my example is more complicated than anything depicted on that page. please explain. actually

Re: basic sql join question...

2005-05-29 Thread Philip George
actually, i've decided this is sort of a moot point, since i can do this calculation in the client app. no sql required. thanks. - philip -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Could not initialize master info structure, check permisions on master.info

2005-05-29 Thread Gleb Paharenko
Hello. Are you restoring the database on the running slave? What is the sequence of steps which you're doing? Find the master.info file - it is usually located in the data directory and check it's permissions. See: http://dev.mysql.com/doc/mysql/en/slave-logs.html Is it possible that

Re: 'ERROR 1045 (28000): Access denied' when trying to LOAD DATA INFILE.

2005-05-29 Thread Gleb Paharenko
Hello. You should have FILE privilege. The FILE privilege is administrative privilege that can only be granted globally (using ON *.* syntax). Jeroen Van Goey [EMAIL PROTECTED] wrote: Hi all, I connect via ssh from a Linux RedHat 9 box to a remote FreeBSD server. There I can

Re: mysql and php

2005-05-29 Thread cma7b5
I have the php app Gallery, a php web based based photo gallery running and that works fine. mysqld is running and I can login through the CLI and use the db 'mysql' with root or with my superuser, so that's OK. All that seems to have transfered over from upgrading the OS without a hitch.

MySQL+InnoDB Licenses

2005-05-29 Thread Daniel Kiss
Hi All, I would have a question about licensing MySQL. I am writing an application that relies on MySQL+InnoDB (uses MySQL as a database backend). I will distribute my program under GPL (get fees only for official support). Do I or my client have to buy MySQL+InnoDB licenses in this case?

Re: mysql and php

2005-05-29 Thread Philip George
try looking at these two pages: http://dev.mysql.com/doc/mysql/en/access-denied.html http://dev.mysql.com/doc/mysql/en/connecting-disconnecting.html search them both for '2002' (multiple instances on one of the pages). there a couple suggestions for things to try. hth. - philip -- MySQL

Re: mysql and php

2005-05-29 Thread Philip George
one of the posts at the bottom of one of those pages mentions that the permissions on the sock file might not be right. mine is: srwxrwxrwx 1 mysqlwheel0 29 May 06:41 mysql.sock you probably already know all this, but just in case... to get those permissions set up: stop

Re: mysql and php

2005-05-29 Thread cma7b5
I don't see anything I haven't tried there, i.e., defining the sock in the connection. Thanks. On May 29, 2005, at 1:33 PM, Philip George wrote: try looking at these two pages: http://dev.mysql.com/doc/mysql/en/access-denied.html

Re: mysql and php

2005-05-29 Thread cma7b5
Ok, thanks all. I believe I need a fresh installation. What I do get is why running 'mysqladmin -variables' reports the location of mysql.sock and there seems to be no mysql.sock anywhere on this machine! Not in /tmp not /var/mysql (where it says it is). Gil On May 29, 2005, at 1:59 PM,

Re: mysql and php

2005-05-29 Thread Philip George
On May 29, 2005, at 11:13 AM, [EMAIL PROTECTED] wrote: ?php $server = localhost:/var/mysql/mysql.sock; $user=mysuperuser; $password=mypassword; $db = mysql; mysql_connect($server, $user, $password); mysql_select_db($db); echo mysql_error(); phpinfo(); ? I get these: Warning: mysql_connect():

load data infile. Empty input field - integer. How make NULL ?

2005-05-29 Thread Pete Lancashire
I've been surfing the list / google but can't find what to do I have a tab sep file, where there are empty fields i.e. tabtab the fields are associated with a mysql table integer type. how do I get the empty fields to become NULL instead of 0 (zero) with a warning ? Thanks, -pete -- MySQL

Re: mysql and php

2005-05-29 Thread Michael Stassen
mysqld won't start if it can't create the socket, so if mysqld is running, you've got a socket somewhere. Once you find out where, you can fix your connection problem by setting the appropriate path in your php script. I don't think you need a fresh install. Michael [EMAIL PROTECTED]

Re: mysql and php

2005-05-29 Thread Michael Stassen
Philip George wrote: one of the posts at the bottom of one of those pages mentions that the permissions on the sock file might not be right. mine is: srwxrwxrwx 1 mysqlwheel0 29 May 06:41 mysql.sock you probably already know all this, but just in case... to get those permissions

Re: load data infile. Empty input field - integer. How make NULL ?

2005-05-29 Thread mfatene
Hi, If you let a tabulation, you will have 0 for numbers. supposing this is the file tab.txt : a 1 c a c mysql load data infile c:/tab.txt into table tab fields terminated by \t enclosed by \ lines terminated by \r\n; Query OK, 2 rows affected, 1 warning (0.00 sec) Records:

Re: MySQL+InnoDB Licenses

2005-05-29 Thread mfatene
This has never arrived : Hi, the only right answers sould be here : http://www.mysql.com/company/legal/licensing/ Mathias Selon Daniel Kiss [EMAIL PROTECTED]: Hi All, I would have a question about licensing MySQL. I am writing an application that relies on MySQL+InnoDB (uses

Re: basic sql join question...

2005-05-29 Thread mfatene
re-submitted : re-send : Hi, you can use mysql variables : set @total:=0; select name,price,quantity, price*quantity as subtotal,@total:[EMAIL PROTECTED] from fruits; ++---+--+--+---+ | name | price | quantity | subtotal

Re: mysql and php

2005-05-29 Thread mfatene
re-submitted re-send : hi, php has to be configured with mysql support. see http://www.whoopis.com/howtos/php-mysql-osx.html and a general google search : http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N Mathias Selon Michael Stassen [EMAIL PROTECTED]:

Re: mysql and php

2005-05-29 Thread Philip George
mysql.sock is created by mysqld when it starts, and destroyed when it stops. haha. you're absolutely right. that doesn't make any sense. i wasn't thinking about the nature of socket files when i wrote that. now that i go back and read the post i was referring to, i think the poster was

Re: basic sql join question...

2005-05-29 Thread Philip George
On May 29, 2005, at 2:34 PM, [EMAIL PROTECTED] wrote: you can use mysql variables : set @total:=0; select name,price,quantity, price*quantity as subtotal,@total:[EMAIL PROTECTED] from fruits; ++---+--+-- +---+ | name |

Re: mysql and php

2005-05-29 Thread cma7b5
Yes, now-a-days php is enabled by default... well on OSX Server it is and Mysql support is built-in and turned on. You do have to start Mysql on OSX Server. Gil On May 29, 2005, at 3:35 PM, [EMAIL PROTECTED] wrote: re-submitted re-send : hi, php has to be configured with mysql

Cannot start mysql due to possibly a bug

2005-05-29 Thread Mouse Doctor X
Nice time of the day. I apologize I am writing on this address because didn't find START NEW THREAD on mailing lists page. The problem is this: I have the freshest version of Gentoo Linux, and mysql within it. Just didn't modify /etc/mysql/my.cnf, commenting only one line: skip-innodb. Have

Re: basic sql join question...

2005-05-29 Thread mfatene
Hi, you can use mysql variables : set @total:=0; select name,price,quantity, price*quantity as subtotal,@total:[EMAIL PROTECTED] from fruits; ++---+--+--+---+ | name | price | quantity | subtotal | @total:[EMAIL PROTECTED] |

Re: mysql and php

2005-05-29 Thread cma7b5
Remember guys, I went through this on the phpmyadmin list before turning here. I was told to run the command 'mysqladmin variables' to find out where the the socket was; I did that successfully and it showed up at /var/mysql/mysql.sock. And viola, now with mysqld running, it does show up

Re: mysql and php

2005-05-29 Thread Peter
Hi, here is a workaround that might help you. I guess you have a Network card. So instead of using 'localhost' as host use your ip e.g '192.168.0.1;. That will force MySQl use TCP/IP instead of socket. Just have in mind that: 1. In /etc/my.cnf You should comment skip-networking if presenet

Re: mysql and php

2005-05-29 Thread sol beach
Gil, THREE elements need to be match what is stored inside MYSQL DB. 1) username 2) password 3) hostname You need to enable MYSQL logging, restart the DB, try to login from PHP. Then, take a look at what MYSQL shows in its logfile post the results here! YMMV On 5/29/05, Peter [EMAIL

Re: mysql and php

2005-05-29 Thread cma7b5
Ok, afraid I'm having to ask: how do access the mysql log file? Or, how to enable logging... I gather this will cause a verbose mode from the CLI? Not sure what I should be doing here. Thanks in advance. As for the 3 elements listed below --wouldn't those be present in the mysql db

Re: mysql and php

2005-05-29 Thread mfatene
hi, php has to be configured with mysql support. see http://www.whoopis.com/howtos/php-mysql-osx.html and a general google search : http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N Mathias Selon Michael Stassen [EMAIL PROTECTED]: You haven't given us much to go on, other

Re: mysql and php

2005-05-29 Thread cma7b5
This is very old, several years, info you've been passing along. Mysql switches are on by default now. Mac OSX (Server for me) is not 10.4 Tiger, you've posted 10.2 Jaguar info, one version prior to 10.3 Panther which was itself released over a 18 months ago. Thanks anyway. :) Gil On

Re: mysql and php

2005-05-29 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Remember guys, I went through this on the phpmyadmin list before turning here. That doesn't help us much, as we haven't seen that conversation. I was told to run the command 'mysqladmin variables' to find out where the socket was; I did that successfully and it

multi-thread insert into innodb table with auto_increment column cause deadlock

2005-05-29 Thread Gu Lei
Description: SQL state: HYT00 Native error: 1213 SQL Errortext: Deadlock found when trying to get lock; try restarting transaction SQL STATEMENT: insert into OCHARTORGANIZATION (CORPID,MODIFIED,MODIFIER,ORGIID,PARENTIID) values(?,?,?,?,?) mysql desc OCHARTORGANIZATION;

Re: performance on single column index with few distinct values

2005-05-29 Thread Terence
Hi Daniel, Here's some more data which might help. This query does not appear to be using the composite index although there is one on the master_id and ticket_id. The below query takes about 3 seconds. Anyway I think I will still move to seperate tables for each master id. Thanks for the

Porting Application to MySQL

2005-05-29 Thread George Sexton
I have an application that right now supports SQL Server, Access, DB2, Oracle 8 9, Sybase SQL Anywhere, and PostgreSQL. I thought since version 5.0 was finally supporting views, I would try porting my app to it. These comments are based on testing 5.0.4 under Linux. Here are my initial results.

Displaying Dynamic Japanese

2005-05-29 Thread Mark Sargent
Hi All, I have my settings in php.ini set for UTF-8, and the encoding for the database table's column that is using Japanese to UTF-8. Now, if I view the data stored in that column in phpmyadmin, via say, firefox, it displays in UTF-8, but, if I pull the code from the database and display it

user

2005-05-29 Thread almo geeth
hai . send me the details of database server feature comparison between 4.0 and 5.0 beta version .if we upgrade our server form 4.0 to 5.0 or 4.1 what are all the changes will happen with our tables and databases.let me know the details of functions what wil support in 4.1 and 5.0 afer