mysql-management

How to write efficient MySQL query to delete specific rows depending on constraints

Hello all! I got a question regarding my MySQL-database and would like to get input on what would be most efficient. My problem is as follows, I'm developing premium functionality for my board game web site. One premium functionality would be that all the games a user has played would be stored "forever" (for the user to look up after...

mysql never releases memory

I have a production server clocking about 4 million page views per month. The server has got 8GB of RAM and mysql acts as a database. I am facing problems in handling mysql to take this load. I need to restart mysql twice a day to handle this thing. The problem with mysql is that it starts with some particular occupation, the memory con...

How to improve security of mysql database

I'm a student and we are making a simple information system for a hospital. How can we improve the security of mysql database so that confidential information will be protected. ...

How to drop all table in MySQL?

I don't want to drop database, because I'm not hosting the website on my own machine, drop the database will require create it again,and many settings. Is there a command in MySQL that can be used to delete all tables in a specific database? EDIT Everything I can do is within a phpMyAdmin ...

Why would a simple MySQL update query occasionally take several minutes?

I have a hefty db server with lots of very similar InnoDB databases. A query that I run often simply updates a timestamp on one row in a small table. This takes like 1-2 ms most of the time. Occasionally, at night, probably while backups and maatkit replication tools are running, one or more of these queries may show "Updating" for se...

how to call mysql console using vb.net

Is it possible to call mysql console using vb.net?Or to create a mysql database backup using vb.net. I'm thinking if I could use a .bat file to execute the mysql dump code for me. And then call it using system.diagnostic.process.start in vb.net. But I don't have any idea on how I can call the mysql console.exe. Because I have only exper...

MySQL: How do I increase room for the queries in general_log?

Hi guys, In MySQL, I've set the log_output to FILE, and general_log to ON, and the queries start rushing in for me to debug. BUT, after 1022 bytes, each query is abruptly truncated. How can I increase this limit so that I get to debug also the long queries? Cheers Nik ...

Importing databases which contain cross schema views

I am dealing with a project which uses cross-schema views heavily. The problem I am looking to solve is importing these schemas in simple manner, without errors. I'll explain this further: Let's say the schemas are A and B. In schema A there is a view which points to schema B and the other way around. When importing the A mysqldump fil...

i want to export table from SQL Server to mysql

Hi i want to migrate the tables from SQL Server to mysql, Can please refer some good tools or give some suggestion , how to start the migration , Also please tell me how to export the table in SQL Server. Thanks ...

How to know about MySQL 'refused connections'

Hello, I am using MONyog to montitor my two mysql servers. I get alert emails from MONyog when something goes wrong. There is an error I could not find out why. It says: Connection History: Percentage of refused connections) - 66.67% the percentage is not important, this is just about having refused connections. I get this email e...

MySQL server's thread_stack parameter - what is it? How big should it be?

Couple days ago I got following error from MySQL database: Thread stack overrun: 68744 bytes used of a 196608 byte stack, and 128000 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack. All documentation that I found says, that: The default is 64KB before MySQL 4.0.10 and 192KB thereafter. If the thread stack size ...

Splitting mysql database per client

I am working on a database that is relatively small. It has a total of 67 tables, with a little over a million records. It is about 254 MB. The application that works with it has been running for about 5 years and the amount of usage has doubled each year. This year we are projected to triple which will just almost double the database in...

Is it possible to list MySQL Server closed connections?

To list active connections we do: show processlist; What to do to list old closed connections? ...

Insert delayed in rails

how to do? there is an active record option? ...

MySQL email templates.. Is it possible?

Not sure if it's possible but it's worth a shot.. I am trying to insert into a MySQL 'TEXT' field some text.. Some of the words within the text I want to change depending on other fields from some other tables in the MySQL database.. Something similar to a php email template where the 'Dear ${first_name}' can be changed depending on who ...

Update Local Server MySql Database from the Server MySql Database

How it is possible to update localhost MySql database with server mysql database at particular interval. Web application is made in PHP and database should be in MySql. Suppose I have a Database at Hosting site Now i want to update my database at regular interval with Local Host Database at my Local Computer.Please suggest me ?? ...

How to drop multiple databases based on a prefix string

example_ or e_ I want to drop all databases that match the prefix e_, so that e_database1, e_database2 and so forth are dropped. Commands that do not work: mysql drop database e_% mysql drop database e_* I'm not looking for all the tables in a given database, but all the databases in a given MySQL server. ...

optimizing query

I have a Table foo which records the sightings of bird species. foo_id is its PK, other concerned columns are s_date, latitude and longitude. species_id is its FK. I have indexes on s_date, latitude and longitude, species_id. Table foo has 20 million records and increasing. The following query gives me top 10 latest species sightings in ...

Is the specification of ssl-cipher enough to secure a MySQL client connection to a SSL Enabled MySQL Server

I have successfully setup my MySQL server to support SSL connections I'm just wondering if I need to copy client certs to each other server I want to connect to it OR if I can get away with just specifying: [client] ssl-cipher = DHE-RSA-AES256-SHA:AES128-SHA All I need to do is encrypt the traffic between servers (s...

What is MySQL's connection compression overhead on small datasets?

Is there any significant overhead to turning on mysql's connection compression for high load databases or is it always a winner? We have databases delivering very small datasets back to the requesting program (PHP) but these databases receive very large bursts of traffic from time to time. If I turn on connection compression am I likely...