473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to set up mysql temporary tables at startup

I like to create some temprary tables (in-memory tables) when mysql
starts up. How do I do that.

Thanks.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-set-te...ict224284.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=773056
Jul 23 '05 #1
4 2073
"steve" wrote:
I like to create some temprary tables (in-memory tables) when
mysql starts up. How do I do that.

Thanks.


On further reading, I need heap tables, which are shared by all
connections. But the idea should be the same.
Jul 23 '05 #2
"steve" wrote:
On further reading, I need heap tables, which are shared by
all connections. But the idea should be the same.


anyone??
Jul 23 '05 #3
steve wrote:
"steve" wrote:
> On further reading, I need heap tables, which are shared by
> all connections. But the idea should be the same.


anyone??


The definition of heap tables stay around, according to the docs, but
the data within the table evaporates. So you don't have to create the
table at MySQL startup time, you just need to load it with data.

If you're on UNIX/Linux, you can edit the mysqld_safe script that starts
the MySQL daemon. Once the mysqld daemon has been started successfully
within that script, add a line to run the 'mysql' tool to execute a SQL
script which performs any commands you want, such as loading some data
into those heap tables.

If you run the MySQL Server on Windows, I don't have a solution to
suggest for you. There doesn't seem to be an equivalent to the
mysqld_safe script.

Regards,
Bill K.
Jul 23 '05 #4
"Bill Karwin1" wrote:
steve wrote:
"steve" wrote:

 > > On further reading, I need heap tables, which are
shared by
 > > all connections. But the idea should be the same.

anyone??


The definition of heap tables stay around, according to the
docs, but
the data within the table evaporates. So you don't have to
create the
table at MySQL startup time, you just need to load it with
data.

If you're on UNIX/Linux, you can edit the mysqld_safe script
that starts
the MySQL daemon. Once the mysqld daemon has been started
successfully
within that script, add a line to run the 'mysql' tool to
execute a SQL
script which performs any commands you want, such as loading
some data
into those heap tables.

If you run the MySQL Server on Windows, I don't have a
solution to
suggest for you. There doesn't seem to be an equivalent to
the
mysqld_safe script.

Regards,
Bill K.


Thanks, Bill. That is what I was missing. Did not realize that the
definitiion stays around, and was thinking of having to redefine the
table every time the server comes back on.

I currently use CacheLite to implement caching (I long for ASP’s
Application variable). I am thinking of using temp tables instead,
but looks like they don’t support text fields, so pretty limited.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-set-te...ict224284.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=778978
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
0
by: Soefara | last post by:
Dear Sirs, I have been developing an application on Windows with MySQL 3.23, making use of temporary tables. Now when I try to port the application to a Unix box running also MySQL 3.23, I...
0
by: Eric B. | last post by:
Hi, I'm somewhat new to MySql. I've been using it for a while, but pretty much out of the box setup, and am starting to suffer heavily with my larger tables. I have a table with 5,000,000+...
1
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer...
1
by: Good Man | last post by:
Hi there I've noticed some very weird things happening with my current MySQL setup on my XP Laptop, a development machine. For a while, I have been trying to get the MySQL cache to work....
1
by: PowerLifter1450 | last post by:
I've been having a very rough time installinig mySQL on Linux. I have been following the instructions form here: http://www.hostlibrary.com/installing_apache_mysql_php_on_linux Everytime I get to...
3
by: Paschat | last post by:
Hi, I installed MySQL server 5.0 on a USB key. If I plug the key in another computer runnng XP, start the server, run some queries, do some updates, stop the server and remove the key, will it...
5
by: WPW07 | last post by:
Hello, I've installed the ODBC connector for MySQL and can go into Access and manually link to the MySQL tables. Everything works fine this way. But rather than go into the Windows Data...
1
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, Last year I got a chance to work with R&D team, which was working on DB scripts conversion.. Though there is migration tool available, it converts only tables and constraints.. Rest of...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.