Tim,
I did this for a large collection of images, ~1million images up
around 40 gigs total last time I checked (no longer involved in the
project). It worked very well, performance was not horrible compared
to file-based storage. I always feared that MyISAM table getting
corrupted and
Seems like what you need is an auto-increment key. Is that out of the
question?
On Apr 18, 2006, at 1:34 AM, abhishek jain wrote:
Dear Friends,
I run several processes and they need to query the mysql 5.0.8
database
simultaneously .I have a config table which have the record id. I
need to
On Jun 27, 2005, at 1:32 PM, Ted Zeng wrote:
I don't know if it is possible under Mac OS. But I assume it is,
consider it is basically a UNIX.
I just want to trigger a shell script, say, a perl script.
Could a shell script be called from a C program?
It looks like I will need to go through a
I don't know how big your tables are, and if you can withstand any
downtime. Because we're using MyISAM tables, we use mysqlhotcopy,
which locks the database as it copies the tables to another location.
Once that's been done you can rely on your filesystem backup to keep
copies of the data
A trigger is a good place to check the value, and change it, bit I
don't believe you can actually generate a MySQL error within the
trigger that will prevent the data from being inserted. Currently
(unless there's been an update to triggers that's not yet in the
docs), you can only change
Hi,
Use enum with a default type and let mysql do the check for you.
The problem with an enum is that if you insert a value that's not in
the enum, MySQL doesn't stop the insert, it leaves the column empty.
This doesn't enforce data integrity like I think Chris wanted.
mysql desc
First, remember when MySQL interacts with the filesystem it does so with
the privileges of the mysql user (or whatever user is running the
database). You'll have problems if that user doesn't have permissions in
that dir.
I'm not sure what OS GoDaddy runs, but if it's a flavor of Linux the
One other thing to check, make sure --skip-networking isn't specified in
your configuration.
mysql show variables like 'skip_networking';
+-+---+
| Variable_name | Value |
+-+---+
| skip_networking | OFF |
+-+---+
1 row in set (0.00
Not necessary to change my.cnf, unless --skip-networking was specified.
Also assuming that you are using port 3306.
mysql show variables like 'port';
+---+---+
| Variable_name | Value |
+---+---+
| port | 3306 |
+---+---+
1 row in set
I'm using 5.0.2 and playing with views. The documentation indicates:
CREATE [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}] VIEW . . .
I can't figure out what that alrorithm setting changes (it's not
discussed in the MySQL documentation). I don't see it in the SQL:2003
docs I have. It looks like
There are several ways to get output to a text file, from the Unix shell
you can:
mysql -e select * from table database output.txt
or if you're looking for more of a log of what happened in the MySQL
client, from the MySQL shell:
tee output.txt
select * from table;
Mulley, Nikhil wrote:
Hi
Back in 3.23.x we used to see MySQL hang on a corrupt table (typically
caused by an improper shutdown). A kill -9 was needed to stop the
process, upon restart we'd run a mysqlcheck (MyISAM tables) and repair
the table. We didn't see anything obvious in the logs except the last
query, which was
You can use the replace string function:
update table set
file_path=replace(file_path,'aFolder','aFolder/aChildFolder');
In each update aFolder will be replaced by the new path.
John Mistler wrote:
I have a column that holds hard disk file location info such as:
/Volumes/External
It's ulgy, and I'm not sure how efficient it is, but this will do the trick:
select concat(left(first,1),substring(lower(first) from 2)) as first;
Aaron Wolski wrote:
Hey guys,
I have a column in a table called 'first'.
Currently all records are upper case. Is it possible for me to do a
select
What version of MySQL are you using? Subqueries aren't available until
4.1.x.
saiph wrote:
hi,
mysql update table1
set c = (select c2 from table2 where c2 = 'value')
where id = 123;
give me an ERROR 1064.
i.e.
create table t1 ( id int primary key, name varchar(20) );
create table t2 ( id int
There are a number of steps after installation that need to happen
before you will be able to connect:
http://dev.mysql.com/doc/mysql/en/Unix_post-installation.html
naresh bhalala wrote:
Respected Sir/Madam,
I have download the MySQL4.0 from www.dev.mysql.com
and file is
David Blomstrom wrote:
I'm working on an add/edit form, illustrated by the
screehnshot at http://www.geoworld.org/addedit2.gif
I decided to arrange the rows by ID, rather than
alphabetically. So I opened the table in phpMyAdmin,
clicked Operations, then changed Order by from a
field named SCode to
Maybe a long shot, but creating this table should have required using
backticks around `Column` because it's a reserved word. Made me wonder
if the ID field in the create statement was in backticks as well and
maybe has an extra character.
What does show create table Spot show?
Hi,
I have a
giovanni cordeschi wrote:
Using PHP i'm not able to insert a binary variable into a field of type
mediumblob of mysql.
The command I've used is:
$cfg_Query = Insert into (operazioni, datacreazione) Values
('.$contents.', Now());
$result = mysql_query($cfg_Query, $conn)
It doesn't appear there
Brandon Metcalf wrote:
We are running 3.23.58 on Solaris 8 and seeing the following problem.
Periodically, mysqld gets into a state where we can't query just one
table in all of our DBs--queries just hang. Restarting mysqld always
fixes the problem, but a SIGKILL is required to stop it.
Have you
David,
MySQL is up to the task. Oodles of people doing this. We do something
similar for course syllabi, thousands of documents (currently 113,676),
both in XML and HTML, which can be as large as 100 pages when printed.
I'm sure there are examples out there with more impressive statistics.
Seems like you could do it either way:
PHP
?
$new_num = $mysql_num + $user_num;
mysql_query(update table set number = $new_num where . . .)
?
or
MySQL
?
mysql_query(update table set number = number + $user_num where...)
?
Depends if you want php or mysql to perform the calculation.
Daniel
H Bartel wrote:
I have the following tables which look like this:
table tartist
++--+--+---+---+
| id | name | info | image | genre |
++--+--+---+---+
table programm
++--+---++
| id | date | stage | artist |
++--+---++
Abubakr wrote:
I am trying to copy a file stored in longblob column of a table to a
longblod column of another table, can any one tell me what kind of
insert statement should i use for that purpose.
You should be able to insert into your upload table with a select from
your testing table.
In a lot of cases storing images on the filesystem makes the most sense.
We store images in a database because we have multiple webservers that
need to both read and write images. Keeping them in MySQL makes this
easy. NFS isn't an option for us.
Having images in the database also makes
There's a quick install guide on the MySQL site, which has most of what
you've listed:
http://dev.mysql.com/doc/mysql/en/Quick_install.html
The INSTALL-SOURCE doc which comes in the tarball covers the process in
great detail.
There may be others, those are two I've used.
Kamal Ahmed wrote:
Dirk Bremer (NISC) wrote:
The following query produces the following results:
select job_coop as 'Job/Coop', count(*) as Count from queue group by
job_coop;
+--+---+
| Job/Coop | Count |
+--+---+
| B03013 |19 |
| B05044 | 9 |
| B07037 | 6 |
| B15037 |
Using --skip-column-names with the client or mysqldump suppresses the
column names.
Cao, Wenhong wrote:
Hi All,
I am trying to export the records from the tables in the mysql database
into a file. The problem I am having now is that I don't know how to
export the records into a file without
Robert Ameeti wrote:
I'm a newbie trying to follow a tutorial. The tutorial says to type:
mysql employees employee.dat
The employee.dat file doesn't have to be in any specific location, as
long as you can read it.
To run the command above, cd into the directory with the employee.dat
file
Yes, the file permissions do affect whether the table can be updated.
The files need to be writable (in the filesystem sense) by the user
running mysqld.
By default MySQL creates directories umask 0700 and files 0660 unless
the UMASK env variable is set differently when mysqld is started. If
Add the -t option to ensure you're getting the table output stuck into
your file.
mysql -t -uuser -N -eselect date_format('2004-02-29','%X') sample2.txt
Yingyos wrote:
Hi Victor Pendleton ,
I type this command line.
mysql -uuser -N -eselect date_format('2004-02-29','%X') sample2.txt
When i
Yes. We do something like this to build packages from a local install.
./configure --prefix=/usr/local/mysql-4.018
make
make test
make DESTDIR=${HOME}/build/mysql/pkg install
Adaikalavan Ramasamy wrote:
Dear all,
Is it possible to install mysql locally on Sun Solaris 8 as I do not have
root
32 matches
Mail list logo