Re: latin1/utf-8 problem
--- On Saturday 27 November 2004 12:52, Gleb Paharenko wrote: | Hello. | | Strange behavior. You said that both servers configured to use latin1? | What output produced Can only do with for the local server, access is denied to the mysql shell on the shared hosting. But it's the local system that's causing the unexpected effects: | show variables like '%char%'; character_set latin1 character_sets latin1 big5 [...bunch of others including latin5 - no utf-8 to be seen anywhere...] convert_character_set | show variables like '%colla%'; empty set | show create database 'database_name'; ERROR 1064: [sql syntax error] | show create table 'table_name'; ERROR 1064: [sql syntax error] | on both servers? Also send your my.cnf files. [client] port= 3306 socket = /var/lib/mysql/mysql.sock default-character-set = latin1 [mysqld] port= 3306 socket = /var/lib/mysql/mysql.sock datadir = /share/mysql/data skip-locking set-variable= key_buffer=16M set-variable= max_allowed_packet=1M set-variable= table_cache=64 set-variable= sort_buffer=512K set-variable= net_buffer_length=8K set-variable= myisam_sort_buffer_size=8M log-bin server-id = 1 [safe_mysqld] err-log=/var/lib/mysql/mysqld.log [mysqldump] quick set-variable= max_allowed_packet=16M [mysql] no-auto-rehash [isamchk] set-variable= key_buffer=20M set-variable= sort_buffer=20M set-variable= read_buffer=2M set-variable= write_buffer=2M [myisamchk] set-variable= key_buffer=20M set-variable= sort_buffer=20M set-variable= read_buffer=2M set-variable= write_buffer=2M [mysqlhotcopy] interactive-timeout -- @+ Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: latin1/utf-8 problem
--- On Friday 26 November 2004 17:58, Gleb Paharenko wrote: | Hello. | | What charset produced mysqldump with --default-character-set=latin1 command | line option? Hmm, that still produced a file with utf-8 characters, which means they must be stored that way in the table, no? (Although MySQLcc sees them correctly). (BTW, I've configured Kwrite, the editor I'm using, to open/save as iso-8859-1). @+ Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: latin1/utf-8 problem
--- On Saturday 27 November 2004 12:16, Steve Mansfield wrote: | --- | | On Friday 26 November 2004 17:58, Gleb Paharenko wrote: | | Hello. | | | | What charset produced mysqldump with --default-character-set=latin1 | | command line option? | | Hmm, that still produced a file with utf-8 characters, which means they | must be stored that way in the table, no? (Although MySQLcc sees them | correctly). | | (BTW, I've configured Kwrite, the editor I'm using, to open/save as | iso-8859-1). Just to provide a bit more info - and to double-check - I exported the table from the live system (via phpMyAdmin) and looked at it on my local system and it was in latin1. I dropped the table from the live system, then uploaded the copy of the table that I'd dumped from my local system using the --default-character-set=latin1 option. On the live system, this now has utf-8 characters (so it's nothing to do with my editor...). -- @+ Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: latin1/utf-8 problem
--- On Saturday 27 November 2004 12:38, Steve Mansfield wrote: Seem to be answering my own questions here...:-) Looks like it's a MySQLcc problem. Dumped tables from the live server and then, rather than running them as a sql query via MySQLcc, I did it from the command line with: mysql -h host -D database -p filename.sql And that worked. The data stayed as latin1. For some reason, MySQLcc is messing with the data and turning it into utf-8. Go figure... -- @+ Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
latin1/utf-8 problem
I have a strange, irritating problem that I think is to do with MySQL. I have a table on a live (shared hosting) system that, when I use it on my local system, seems to wind up in utf-8 rather than latin1. Here's the set-up: Live system - MySQL 3.2.3.56, PHP 4.1.2, Apache 1.3.27. MySQL is configured to use latin1, PHP to no default charset. Local system - MySQL 4.0.18-32, PHP 4.3.4, Apache2 (all from SuSE 9.1 distro). MySQL is configured to use latin1, PHP to no default charset. I have a table containing text with French accented characters. On the live system, these display correctly when viewed with a browser set to iso-8859-1 encoding (which is what the page specifies). On the local system, the page has to be viewed as utf-8. Huh? This is the same data. I dumped the table from the live system (via phpMyAdmin - also set to use latin1) to my local disk. I viewed that with Kwrite which showed me that the text was, indeed, latin1 in that file. I uploaded the table to the local system. In MySQLcc (set to latin1) the text reads correctly. Running myisamchk on the table tells me it's latin1. And yet, if I mysqldump the table, the resulting file appears to be utf-8! And data pulled from the table by PHP also appears to be utf-8. Help! @+ Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't find host.MYD
--- On Sunday 09 May 2004 05:29, you wrote: | 040508 11:10:24 mysqld started | 040508 11:10:24 /usr/sbin/mysqld: Can't find file: 'host.MYD' (errno: 2) | 040508 11:10:24 mysqld ended | Check to see if mysqld is correctly reading your my.cnf, and that no other | --datadir option gets passed on the command line before my.cnf is read. The | easiest way to do it is to add debugging messages to mysqld_safe script | (safe_mysqld in the older versions). Well, I found the problem - after several hours of anguish! Turned out to be something terribly simple. Having checked that all the data files weren't corrupted, by copying them to the MySQL datadir on my WinXP box and running them without problem there, I edited my.cnf to revert to the default datadir (/var/lib/mysql). That worked fine, using the old mysql table. I copied the data files to this directory, recreated the necessary users and found that the tables now worked - but not all of them. In any given database, some tables would work and others would complain about not being able to find the relevant MYD file - eg, tasks.MYD (note capitalisation). I had noticed that capitalisation early on, when mysqld was failing to run because it couldn't find hosts.MYD. I found that the file was actually spelled 'hosts.myd' so I renamed it with the extension capitalised - still didn't work. Same deal with all the other 'missing' MYD files. That's why I tried all kinds of other things, like changing file permissions with every combination I could think of. Finally, I noticed that the tables that didn't work were those I hadn't yet renamed with capitalised extensions. It *has* to be that, I thought. I renamed all the MYD files. Still the system complained about not finding them. Then I also capitalised the extensions of the MYI files and bingo... So, it turns out that my problem was an unhelpful error message -=sigh=-. But it does raise a question: I didn't change any of those files - files which had been working for months. I simply copied them to another extension and then copied them back again. Does anyone know if Linux ignores case when using FAT32 partitions? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Can't find host.MYD
I know this is a thorny old problem, but I'm having trouble resolving it. Here's the set-up. I'm running Linux. The MySQL data directory (as configured in my.cnf) is /share/mysql/data/ because I was sharing the data between Linux and Windows on a dual-boot system. This set-up has been working fine for months. Some time ago I stopped using and removed Windows. So today I decided that the /share partition should no longer be FAT32. I backup-up everything on it (just simply copied the files to another partition) reformatted as ext3 and copied everything back. Now mysqld won't keep running - ie, it starts up then immediately shuts down again - and I found a message in the mysqld.log file saying: 040508 11:10:24 mysqld started 040508 11:10:24 /usr/sbin/mysqld: Can't find file: 'host.MYD' (errno: 2) 040508 11:10:24 mysqld ended But, the file host.MYD is definitely in the /share/mysql/data/mysql/ directory, although it appears to be 0 bytes (?). I figured this might be a file permissions error, so I've tried changing the owner for all the mysql files to 'mysql' (group is currently 'root') and permissions are 755. This hasn't solved the problem. Any ideas would be most welcome. @+ Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Linux install problem
I'll bet you didn't run mysql_install_db with the --user=mysql option. chown -R mysql.mysql /var/lib/mysql should do the trick. That's right, because I didn't see anything to that effect in the manual, although the manual is a little confusing at this point. Following another post (not in response to mine) I did a chmod on the mysql dir and its contents and that seemed to do the trick. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Dual boot system
I have MySQL installed on a WinXP box, on drive C. Recently, I've installed Linux on the same machine - dual boot, as one does. Linux is sitting on a second HD on which I created a windows partition, seen to Linux as /share and to Windows as D:, in order to share data between the two systems. It is possible to move the current data being used by the Windows MySQL to the D: partition and make this usable by MySQL regardless of what operating system I'm using? I've started looking through the manual, but it's a big manual and I'd appreciate some pointers. I assume both installations of MySQL will have to be configured to look on /share AKA D: for data. So, any tips would be appreciated... a+ Steve
RE: Dual boot system
I don't see why it should be a problem. Data files are binary compatible between OS's, and by definition, one instance of mysqld will be shut down while the other operates on the data. Of course copying rather than moving is always a good recommendation until you're sure that everything works as expected. Especially if you are using InnoDB, you'll want to make sure that you have the config files exactly right on both OSs. - Rich Well, I managed to sort it myself after all - much easier than I thought. I made a copy of all my datafiles to D:/mysql/data. In the my.ini file on Windows I set: datadir = D:/mysql/data In the my.cnf file on Linux I set: datadir = /share/mysql/data (or something like that - running WinXP at the mo' so can't check). And that was it! And I thought computing was difficult. The next challenge is getting Apache MySQL to start up at boot time in Linux. The manual talks about /etc/rc.d but SuSE uses /etc/init.d and a bunch of sub-directories for different run levels, all of which is making my head spin right now. But I'll get there... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Linux install problem
Having run MySQL successfully for a while in a WAMP environment, I'm trying to set up on Linux now (and am a real Linux newbie). I'm using the 4.3.1 version that came as an RPM with SuSE 8.2. The problem is - it doesn't work. Here's where the various elements have installed to: /usr/bin various mysql progs scripts, incl mysql mysqladmin mysql_install_db safe_mysqld etc /usr/sbin mysqld /var/lib/mysql mysql.sock mysql.log linux-bin.001 etc when I run mysql_install_db (in /usr/bin), it creates the 'mysql' dir in var/lib/mysql - so the path to the default database files becomes: /var/lib/mysql/mysql/ From /usr/bin, I run: safe_mysqld --user=mysql and get the message Starting mysqld daemon with databases from /var/lib/mysql but then the daemon shuts down straight away. When I look in the log file, I find: /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13) It looks as though the mysql_install_db has put the files in the wrong place. Can anyone give me some advice as to how I sort this out...? Thanks. Steve
delete using a join
I'm using Mysql 3.23.51 on redhat. does anyone know if there is a way of deleting records using a join. I read somewhere that this is only supported as of version 4.x Regards, Steve Mansfield [EMAIL PROTECTED] http://www.getreal.co.uk Real Data Services Ltd 117-119 Marlborough Road Romford Essex RM7 8AP [Office] 0870 757 7900 [Fax] 0870 757 8900 http://www.be-an-isp.comhttp://www.isdn4free.co.ukhttp://signup.getreal.co.uk For our email disclaimer please see the url below. http://www.getreal.co.uk/disclaimer.htm -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
select query to give sum and distinct values
Using mysql 3.23.51 I have a mysql table that holds records for telephone traffic. The table fields are as follows: idstartstop clidditot_dur day_dureve_durwkd_dur 1 08/12/2002--23:50:0009/12/2002--02:23:551507608105 08451340206923508635600 2 09/12/2002--00:14:1509/12/2002--00:15:081634324824 0845134012053.1 053.1 0 3 09/12/2002--00:20:1709/12/2002--00:20:591634324824 0845134012041.9 041.9 0 4 09/12/2002--00:28:0009/12/2002--00:28:461634324824 08451340120460460 5 09/12/2002--00:30:2509/12/2002--00:31:041634324824 0845134012038.9 038.9 0 6 09/12/2002--03:22:3009/12/2002--05:08:431507608105 084513402066372.9 06372.9 0 7 09/12/2002--05:25:2509/12/2002--05:35:561622859384 08451340214631.6 0631.6 0 What i'm trying to do is run a query that will give me the sum tot_dur for each distinct ddi ie: distinct ddi will give me the list of all the ddi numbers that were called but i need the sum of tot_dur for each distinct ddi. so it should produce an output like: dditot_dur 08451340120179.9 0845134020615607.9 08451340214631.6 Anyone have any ideas as i just cannot get the query correct. Steve Mansfield [EMAIL PROTECTED] http://www.getreal.co.uk Real Data Services Ltd 117-119 Marlborough Road Romford Essex RM7 8AP [Office] 0870 757 7900 [Fax] 0870 757 8900 http://www.be-an-isp.comhttp://www.isdn4free.co.ukhttp://signup.getreal.co.uk For our email disclaimer please see the url below. http://www.getreal.co.uk/disclaimer.htm - 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
adding values together
Hi, doeas anyone know if it's possible to add 2 or more numeric values together that are in the same cell in Mysql: IE: i have a cloumn called price that for any entry may contain more than one value, lets say £1.00 and £2.00 Is there a way that i can get these values added together ? I know it's easy if they are in separate rows but unfortunately they're not. see the example iditemprice 1 apple 1.00 2 apple 1.00 pear2.00 3 banana 1.00 I need to get the sum for price for id 2. Regards, Steve Mansfield Head of Development [EMAIL PROTECTED] http://www.getreal.co.uk Real Data Services Ltd 117-119 Marlborough Road Romford Essex RM7 8AP [Office] 0870 757 7900 [Fax] 0870 757 8900 http://www.be-an-isp.comhttp://www.isdn4free.co.ukhttp://signup.getreal.co.uk For our email disclaimer please see the url below. http://www.getreal.co.uk/disclaimer.htm - 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
More compile errors
Ok, I had a problem compiling Mysql 3.23.47 on RH 7.1. I kept getting: checking return type of sprintf... configure: error: can not run test program while cross compilingany way, i tried updating gcc to 3.0.3 which didn't help. So i installed all the RPM's for gcc 2.96-85 and it solved the problem. However, I now get the following a bit further along ./configure --blah-blah which is as follows: checking for tgetent in -lncurses... no checking for tgetent in -lcurses... no checking for tgetent in -ltermcap... no checking for termcap functions library... configure: error: No curses/termcap library found Any ideas any1?!?!?!?!?!?!?!?Q?Q?Q?? Regards Steve Mansfield Technical Manager [EMAIL PROTECTED] www.getreal.co.uk Real Data Services Ltd 117-119 Marlborough Road Romford Essex RM7 8AP [Office] +44 [0] 1708 704433 [Fax] +44 [0] 1708 748859 [Mobile] +44 [0] 7973 864677 www.be-an-isp.com www.isdn4free.co.uk http://signup.getreal.co.uk The information contained in this E-mail is confidential and solely for the intended addressee(s). Unauthorised reproduction, disclosure, modification, and/or distribution of this email may be unlawful. If you have received this email in error, please notify the sender immediately and delete it from your system. Real Data Services does not accept legal responsibility for the contents of this message if it has reached you via the Internet, as Internet communications are not secure. Any opinions expressed are those of the author and are not necessarily endorsed by the Real Data Services. Recipients are advised to apply their own virus checks to this message on delivery. - 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