Re: Problem with mysqlimport and timestamp
qt4x11 wrote: Hi- I'm using the command 'mysqlimport -u usr -ppassh -h mysqlserver -P 3306 -v db --local $workdir/$filename'to import a table into mysql from a file $filename. The data in $filename looks something like: test test where there is a blank space between the two 'test's to represent an empty column. This column is of type datetime NULL DEFAULT NULL in the database. The blank space between the two 'test's gets imported as (err) instead of NULL. Is there a way I can import empty column data as NULL? I'd like there to be a NULL for every row for which this column is empty. I'm not sure how to do this given the format of my $filename. As a check, I tried inserting a row at the top of $filename like test The row was imported correctly, as in there was a NULL in the timestamp column in the database, as well as a NULL in the next column in the database. So, this may have something to do with the format of the $filename, but I may not be able to control the format of that file. Thanks. You should alter your data like so: test\N test That is, separate the fields with a tab and place "\N" wherever you want a NULL. As it is, the data is being misinterpreted, which is why the second import you mentioned worked--there was nothing after the first field to be erroneously put into the timestamp field. If the data comes from somewhere else you will need to parse it out and re-write it using proper formatting, i'm afraid. brian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problem with mysqlimport and timestamp
Hi- I'm using the command 'mysqlimport -u usr -ppassh -h mysqlserver -P 3306 -v db --local $workdir/$filename'to import a table into mysql from a file $filename. The data in $filename looks something like: test test where there is a blank space between the two 'test's to represent an empty column. This column is of type datetime NULL DEFAULT NULL in the database. The blank space between the two 'test's gets imported as (err) instead of NULL. Is there a way I can import empty column data as NULL? I'd like there to be a NULL for every row for which this column is empty. I'm not sure how to do this given the format of my $filename. As a check, I tried inserting a row at the top of $filename like test The row was imported correctly, as in there was a NULL in the timestamp column in the database, as well as a NULL in the next column in the database. So, this may have something to do with the format of the $filename, but I may not be able to control the format of that file. Thanks.
Re: finding non-ascii characters within a string
Olav Mørkrid schrieb: > hello > > i would like to search a table column for a range of non-ascii > characters, or a particular non-ascii character. how can i do this? Maybe via a inverted regular expression [1] like this?: SELECT * FROM WHERE RLIKE '[^-, a-zA-Z0-9]' [1]: http://dev.mysql.com/doc/refman/5.1/en/regexp.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: finding non-ascii characters within a string
Hi, Olav Mørkrid wrote: hello i would like to search a table column for a range of non-ascii characters, or a particular non-ascii character. how can i do this? the column can be any string like "hello, world" or "norwegian characters æøå here". refer to these pseudo examples: SELECT * FROM TABLE WHERE COLUMN CONTAINS CHARACTERS BETWEEN 128 and 255; SELECT * FROM TABLE WHERE COLUMN CONTAINS CHARACTER = 240; See the ASCII() and ORD() functions: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
finding non-ascii characters within a string
hello i would like to search a table column for a range of non-ascii characters, or a particular non-ascii character. how can i do this? the column can be any string like "hello, world" or "norwegian characters æøå here". refer to these pseudo examples: SELECT * FROM TABLE WHERE COLUMN CONTAINS CHARACTERS BETWEEN 128 and 255; SELECT * FROM TABLE WHERE COLUMN CONTAINS CHARACTER = 240; thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
server optimization
Hey all, I've got a new server set up, with dual Intel quad core processors, 4 gig of ram, OpenSuse 10.3 (64bit) and MySql 5.0.45. The majority of the tables are MyISAM with a few InnoDB here or there. I'm using the huge-my.cnf as the base for my config. Can anyone suggest some tweeking to the my.conf that will give me the best performance on this platform? Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
server optimization
Hey all, I've got a new server set up, with dual Intel quad core processors, 4 gig of ram, OpenSuse 10.3 (64bit) and MySql 5.0.45. The majority of the tables are MyISAM with a few InnoDB here or there. I'm using the huge-my.cnf as the base for my config. Can anyone suggest some tweeking to the my.conf that will give me the best performance on this platform? Thanks, Jeff
Re: Limiting the text size on text fields
Thank you, Sebastian. Also does the usage of UTF-8 over Latin1 restraints the usage or extensibility? Sebastian Mendel wrote: > > Ganesh's screen schrieb: >> Is there a way to restrict the length of text field in MySQL. For >> example, it >> is of 65K limit and could hold more than 2 characters. Is there a way >> to >> restrict that to 4000 characters at table/field level. Coz the >> max_allowed_packet constrainted the entire DB. > > you can specify the maximum length only on these field types: > > CHAR(length) > VARCHAR(length) > BINARY(length) > VARBINARY(length) > > -- > Sebastian > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Limiting-the-text-size-on-text-fields-tf4627867.html#a13273514 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ADDITIONAL SETTING IN MYCNF
Hi Samuel, The path /etc/mysql/conf.d/ is present in my.cnf file. When i checked conf.d/ contains a file named old_password.cnf The contents of the old_password.cnf is below #create by debconf [mysqld] old_password=false Thanks, Krishna On 10/18/07, Samuel Vogel <[EMAIL PROTECTED]> wrote: > > This line has not come later, it is standard in Debian, to be able to > have parts of your configuration in different files. This line does all > configuration files that are in "/etc/mysql/conf.d/. Since this > directory is probably empty, nothing is done at all. > So you are safe with just leaving this line untouched. > > Regards, > Samy > > Krishna Chandra Prajapati schrieb: > > Hi All, > > > > I have installed debian on a system and then install mysql. Later i > > found that in > > my.cnf file one more line has been add ie > > !include /etc/mysql/conf.d > > > > I don't know how it comes to my.cnf file. Is it going to harm mysql or > OS. > > Why it has come. > > Please help me. > > > > Thanks, > > Krishna > > > > > -- Krishna Chandra Prajapati MySQL DBA, Ed Ventures e-Learning Pvt. Ltd, 201,202, Ashoka Bhoopal Chambers, S P Road, Secunderabad 53. Ph. No. - 040-39188771 Url: www.ed-ventures-online.com
How to grant privileges using REVOKE statement
Hi All! Here is a funny thing I come across when investigating our privilege control system. Consider the following situation: mysql> GRANT ALL ON `%o`.* TO rafal; mysql> GRANT SELECT ON foo.* TO rafal; The intention is that rafal has all privileges for all objects in databases whose name ends with 'o' but he has read-only access to the tables in the 'foo' database. Now imagine DBA decides that rafal should no longer be able to see the data inside the foo database. Then he might issue command mysql> REVOKE ALL ON foo.* FROM rafal; and... tada! rafal has all rights to all tables inside database 'foo'. The reason is that REVOKE command, when it sees that all rights have been revoked, removes the corresponding entry in the privilege table inside mysql database (mysql.db in that case). But removing such entry doesn't mean that all rights will be taken away, since, as this example illustrates, some other entry can apply after removing that one and in fact give more rights than before! A solution would be to not remove any entries when REVOKE is executed - just clear the corresponding flags in the existing entry. Best, Rafal -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: [mysql] Text = Tinytext = MediumText = LongText?
Thank you This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Sebastian Mendel [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 4:21 AM To: mysql@lists.mysql.com Subject: Re: [mysql] Text = Tinytext = MediumText = LongText? Sebastian Mendel schrieb: > Weston, Craig (OFT) schrieb: >> Hello everyone, hopefully a quick question: is there a functional >> difference between the various text field sizes other than size? For >> example if I wanted to could I run a FULLTEXT index against a LongText >> field? > > no ay ... difference: no, FULLTEXT index: yes -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ADDITIONAL SETTING IN MYCNF
This line has not come later, it is standard in Debian, to be able to have parts of your configuration in different files. This line does all configuration files that are in "/etc/mysql/conf.d/. Since this directory is probably empty, nothing is done at all. So you are safe with just leaving this line untouched. Regards, Samy Krishna Chandra Prajapati schrieb: Hi All, I have installed debian on a system and then install mysql. Later i found that in my.cnf file one more line has been add ie !include /etc/mysql/conf.d I don't know how it comes to my.cnf file. Is it going to harm mysql or OS. Why it has come. Please help me. Thanks, Krishna -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ADDITIONAL SETTING IN MYCNF
Hi All, I have installed debian on a system and then install mysql. Later i found that in my.cnf file one more line has been add ie !include /etc/mysql/conf.d I don't know how it comes to my.cnf file. Is it going to harm mysql or OS. Why it has come. Please help me. Thanks, Krishna
Re: Limiting the text size on text fields
Ganesh's screen schrieb: > Is there a way to restrict the length of text field in MySQL. For example, it > is of 65K limit and could hold more than 2 characters. Is there a way to > restrict that to 4000 characters at table/field level. Coz the > max_allowed_packet constrainted the entire DB. you can specify the maximum length only on these field types: CHAR(length) VARCHAR(length) BINARY(length) VARBINARY(length) -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL 5.1.22 is out
Hi Jim, all ! Jim wrote: Is there any kind of timetable for when 5.1 is actually expected to be released? Sorry, no - there cannot be any firm "expectation" yet, and consequently no "timetable". Different people have different *hopes* when that may be, but these personal estimates will be made concrete only by facts and experiences. Consider the following parts of Kaj's blog / mail you quoted: [[...]] We still have some fatal runtime bugs left. We are producing an errata list of these, and expect to have the list ready and published on by 23 Oct 2007. [[...]] Only when this list is available and all its elements have been judged, we will have a full (but only momentary) overview of what still needs to be done. That said, 5.1.22 is a great release, one that we're proud of, and very likely worthy of your attention! So for the MySQL development to bring 5.1 to a true "GA" status, we really need and appreciate your help and feedback, be it bug reports (we sure hope only few ones, but who knows ?) or (positive ?) messages like "I used feature X with the Y amount of data and Z of users/transactions and had these experiences: ...". Regardless of how much we improve and strengthen our own QA, it will never be able to fully mimic the ideas/workload/diversity of our users. Any such feedback, be it negative or (hopefully !) positive, will make that overview more exact and complete. Regards, Joerg -- Joerg Bruehe, Senior Production Engineer MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: [mysql] Text = Tinytext = MediumText = LongText?
Sebastian Mendel schrieb: > Weston, Craig (OFT) schrieb: >> Hello everyone, hopefully a quick question: is there a functional >> difference between the various text field sizes other than size? For >> example if I wanted to could I run a FULLTEXT index against a LongText >> field? > > no ay ... difference: no, FULLTEXT index: yes -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: [mysql] Text = Tinytext = MediumText = LongText?
Weston, Craig (OFT) schrieb: > Hello everyone, hopefully a quick question: is there a functional > difference between the various text field sizes other than size? For > example if I wanted to could I run a FULLTEXT index against a LongText > field? no -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MYSQL DATABASE SERVER
Krishna Chandra Prajapati schrieb: > Hi All, > > The production server on which mysql database was running, get > shutdown on one day. Then we have to manually start it. The server is > hpdl585. What can be the reason of shutdown. What has gone wrong with the > server. Is there is any to find the reason for shutdown. i think this is the wrong list to ask why the (hardware) server with your (software) MySQL server went down. try an OS related mailing list instead but anyway: check your logfiles -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL 5.1.22 is out
Jim schrieb: > Is there any kind of timetable for when 5.1 is actually expected to be > released? the is plan is before end of year - IMHO -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]