Brian Dunning wrote:
I have a column where I need to replace all instances of the text
"US-Complete" (contained within a long sentence) with "US Complete".
There are probably 50 or 100 of them. I'm really scared to do it since I
can't risk screwing up that column - what's the correct syntax?
Brian Dunning wrote:
I have a column where I need to replace all instances of the text
"US-Complete" (contained within a long sentence) with "US Complete".
There are probably 50 or 100 of them. I'm really scared to do it since
I can't risk screwing up that column - what's the correct syntax?
I could use the same thing... just looking through the documentation there
is a replace() function. Maybe do a backup/restore to a test database before
doing this on your live system...
UPDATE `tablename` SET `fieldname`=REPLACE(tablename.fieldname,'US-
Complete','US Complete') WHERE `fieldname` L
I have a column where I need to replace all instances of the text "US-
Complete" (contained within a long sentence) with "US Complete".
There are probably 50 or 100 of them. I'm really scared to do it
since I can't risk screwing up that column - what's the correct syntax?
--
MySQL General Ma
Hiya,
I was backing up a 95GB InnoDB database and forever had problems. It ended up
working and I never really worked out exactly what the cause was... but try
using the following:
--opt (does --quick + extended-insert + others)
--net_buffer_length=1G (set this to whatever you want, 1G is the l
I am having debugging a problem I am seeing with mysqldump.
While using mysqldump to make backups of my database, I will
intermitently get the following error :
mysqldump: Error 2013: Lost connection to MySQL server during query
when dumping table
I am running the pre-compiled 64 bit linux 5
Hi,
Fletcher Mattox wrote:
We were recently the target of an SQL injection, so I am trying to
determine if they were successful. I have recovered the SQL commands
from mysqld.log, but the code has me stumped.
INSERT INTO queries (file,id) VALUES ('labs.php','4 OR 0 IN (SELECT TOP 1
CHAR(60)
If you decide to use the trigger here is the syntax
http://dev.mysql.com/doc/refman/5.0/en/triggers.html
And that table structure looks ok to me
As far as the backup goes just dump the mysql database, which you should be
doing anyway to backup users etc
Olaf
On 9/4/07 3:59 PM, "Hiep Nguyen"
so, if trigger is used then
create table temp (
id int not null primary key auto_increment,
data varchar(100),
inserted timestamp,
lastupdated timestamp)
is good enough, right? trigger will use now() function to set inserted &
lastupdated.
any thought on backup & restore tables & tringgers??
It looks to me that they are trying to plant a query into your queries
file. What type is column 'id'? I am guessing that they (think they)
have found a vulnerability where running a web app (prob labls.php')
after this injection has taken place, the resulting query might get
exectuted...
how ma
Just do this...
create table temp (
id int not null primary key auto_increment,
data varchar(100),
inserted timestamp default 0,
lastupdated default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
And just use
Insert into temp (inserted ) values (NOW());
You're only inserting once, so ju
There is nothing terribly wrong with the approach documented in
'http://sql-info.de/mysql/examples/CREATE-TABLE-examples.html' but, as
you no doubt have read, it does mean that you have to make sure that
every insert statement is specifically designed to set the *second*
timestamp field to now() an
We were recently the target of an SQL injection, so I am trying to
determine if they were successful. I have recovered the SQL commands
from mysqld.log, but the code has me stumped.
INSERT INTO queries (file,id) VALUES ('labs.php','4 OR 0 IN (SELECT TOP 1
CHAR(60)+CHAR(112)+CHAR(102)+CHAR(111)
is it possible to do without trigger?
i google and found this link:
http://sql-info.de/mysql/examples/CREATE-TABLE-examples.html
but when i tried to combine two examples into one CREATE statement and it
didn't work.
any idea?
is there a way to create this table that accomplishes these two go
Agreed...
Also for consistency's sake
On 9/4/07 3:15 PM, "Michael Dykman" <[EMAIL PROTECTED]> wrote:
> Triggers are a fine idea, but I would use a trigger for both cases..
> no point putting that level of housekeeping on the application when
> you can set rules in the database and more or less f
Triggers are a fine idea, but I would use a trigger for both cases..
no point putting that level of housekeeping on the application when
you can set rules in the database and more or less forget about it.
- michael
On 9/4/07, Olaf Stein <[EMAIL PROTECTED]> wrote:
> I would use a trigger (at lea
I would use a trigger (at least for the update)
The first insert should work with now() and you can leave lastupdateted
empty
Olaf
On 9/4/07 3:01 PM, "Hiep Nguyen" <[EMAIL PROTECTED]> wrote:
> Hi list,
>
> i tried to create a table with inserted & lastupdated timestamp fields:
>
> creat
Lucio Chiappetti wrote:
On Tue, 4 Sep 2007, Lucio Chiappetti wrote:
I'll do some experimenting and report back.
In lack of better ways of doing a tie-break, I've done the following
tests (with the linemode client), checking both the results of a query and
the total time spent. I tested 16 d
Hi list,
i tried to create a table with inserted & lastupdated timestamp fields:
create table temp (
id int not null primary ke auto_increment,
data varchar(100),
inserted timestamp default now(),
lastupdated timestamp(8));
how do i get mysql to put in the current timestamp for inserted &
las
Hi,
We've recently upgrade from MySQL 4.0.18 to 4.1.20 and our applications
(Websphere) its not displaying the character as its supposed to do.
But when i do a "select..." from comand , the results from the old server and
the new are the same, also for mysql-query-browser.
Thanks
I had a disk full error on the master MySQL (4.1.22), which was replicating to a
slave (4.1.22).
My question is, how do I recover a slave replica when the master had a disk full
error, space was freed, but the 'disk full' issue left a corrupted master
binlog?
1) Do I have to reinitialize the slav
Perhaps if you show us the table structure and exactly what operations
you are using, we might be able to provide some insight.. as it is,
your report is too vague to make much sense of it.
- michael
On 9/4/07, Justin <[EMAIL PROTECTED]> wrote:
> alright.. after some testing this afternoon I'm
I just changed to these values
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
wait_timeout=30
default-character-set=utf8
max_allowed_packet = 14M (lowered from 3000MB)
max_connections = 600 (lowered from 3000)
ft_min_word_len = 3
key_buffer_size=2500M
now looking into table_
alright.. after some testing this afternoon I'm beginning to wonder if this
is a memory issue.. here's what the test was..
I did a insert select from a table that has approx 500,000 rows and the
table data is about 1gb in size.. the query went and was in the repair by
sorting phase when all of
Hello,
I have a table like this:
CREATE TABLE `places` (
`name` varchar(256) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
Then I want to insert two values:
pjöngjang.com and
pjongjang.com
But on the second record I ge
> [EMAIL PROTECTED] wrote:
>> We have numerous identical tables with a varchar column that holds data
>> like this: "0 0 0 1 0 1 0 25 7 0 139 0 9". Essentially there are a
bunch
>> of integers with a single space as a separator. There _should_ be no
more
>> than 30 entries ( and 29 spaces ),
[EMAIL PROTECTED] ha scritto:
> We have numerous identical tables with a varchar column that holds data
> like this: "0 0 0 1 0 1 0 25 7 0 139 0 9". Essentially there are a bunch
> of integers with a single space as a separator. There _should_ be no more
> than 30 entries ( and 29 spaces ), but
Try this:
mysql> SELECT LENGTH('0 0 0 1 0 1 0 25 7 0 139 0 9') - LENGTH(REPLACE('0 0 0 1
0 1 0 25 7 0 139 0 9',' ','')) + 1;
+-+
| LENGTH('0 0 0 1 0 1 0 25 7 0 139 0 9') - LENGTH(REPLACE('0 0 0 1 0
[EMAIL PROTECTED] wrote:
We have numerous identical tables with a varchar column that holds data
like this: "0 0 0 1 0 1 0 25 7 0 139 0 9". Essentially there are a bunch
of integers with a single space as a separator. There _should_ be no more
than 30 entries ( and 29 spaces ), but sometimes th
Hi,
[EMAIL PROTECTED] wrote:
We have numerous identical tables with a varchar column that holds data
like this: "0 0 0 1 0 1 0 25 7 0 139 0 9". Essentially there are a bunch
of integers with a single space as a separator. There _should_ be no more
than 30 entries ( and 29 spaces ), but sometim
We have numerous identical tables with a varchar column that holds data
like this: "0 0 0 1 0 1 0 25 7 0 139 0 9". Essentially there are a bunch
of integers with a single space as a separator. There _should_ be no more
than 30 entries ( and 29 spaces ), but sometimes the system misfires and
the
Figure it out at 3am this morning while I was sleeping I remembered there
was an rsync on the databases every 10 mins to replicate the files across
the network.
I killed the rsync.. and all has been flawless! =)
gotta love the dream world. answers are always there!
- Original Message -
On Tue, 4 Sep 2007, Lucio Chiappetti wrote:
> I'll do some experimenting and report back.
In lack of better ways of doing a tie-break, I've done the following
tests (with the linemode client), checking both the results of a query and
the total time spent. I tested 16 different combinations of a
Hello,
thanks. I just wonder why this isn't actually documented in the --help
output of mysqldump.
Regards
Marten
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hey,
This morning the default timespan of ssl certificates took my servers
down...
Everything was running fine, but this morning the SSL encrypted MySQL
connections stopped working!
Then I realized that the Problem was, that the certificates ran out this
morning.
The first solution that I foun
Baron,
Just feedback - worked perfectly.
Thanks again!
-Original Message-
From: Esbach, Brandon
Sent: 31 August 2007 14:46
To: Baron Schwartz
Cc: MySQL User Group
Subject: RE: Two/more seperately unique columns in a table?
Hi, and thanks Baron;
I should have been a bit clearer on the b
On Mon, 3 Sep 2007, Shawn Green wrote:
> What I hope to do is to help you to make you queries work better by
> applying hints, modifiers, and limits to the optimizer.
Many thanks, Shawn.
> "STRAIGHT_JOIN is identical to JOIN, except ...
>
> You asked what would happen if you replaced all of yo
Hello list members
Since a few days I get this error message when making a backup of my
database:
mysqldump: Error 2013: Lost connection to MySQL server during query when
dumping table `dbmail_messageblks` at row: 174955
=
Hi All,
I'm using Mysql 5 (with replication) on CentOS 4.4 OS with 2 CPU and 8GB
of RAM.
Master & Slave servers have same hardware configration.
Yesterday my master server, suddenly not established new connections.
i checked the log of master server there is no error, then i checked the
log of sl
39 matches
Mail list logo