473,770 Members | 6,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2095
"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
3527
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 form for a number of platforms from our download pages at http://www.mysql.com/downloads/ and mirror sites.
0
2086
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 keep running into "access denied" errors with the queries which employ temporary tables. This only happens with CREATE TEMPORARY TABLE type queries, all other queries work fine.
0
509
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+ rows that I have to search and do joins on. Although I have an index set up for it, the joined select will still take some 400+ seconds to return, which is obviously unacceptable. This is due to enormous HD access. Perhaps someone can help me...
1
3379
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 uses his own php shopping cart to receive customer orders. The configuration was done via cPanel with no external modifications - which produced no protests when built, ran and connected with no
1
2830
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. Despite entering the required lines to "my.ini" (the new my.cnf) through notepad AND MySQL Administrator, the cache does not work. So, today I took a peek at the 'Health' tab in MySQL Administrator.
1
5285
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 #./configure it goes through all of the preparing tables and starting mysqlServer and daemon, but than immediaetly says "mysql ended" -- I try to do #make right after anyway, but I get the error "No targets specified and no makefile found" -- Any...
3
6438
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 leave any traces on that computer!?!?!? Thanks! Ziguy
5
3419
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 Source Adminstrator on each user's computer, how would you code an MS Access front end to connect to MySQL tables at startup? Where would you put the code and how would you call it when the Access database is opened?
1
9586
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 things (stored procedures, functions).. we have to manually edit. That time, we face some interesting challenges.. I failed to document all of them, but whatever I can share with u.. I will try.. :) ...
0
9592
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10058
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9870
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.