MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
11 views

Do threads in cache still use memory?

I was studying about how and how much memory allocated to each connection thread and found below MySQL tutorial: http://dev.mysql.com/doc/refman/5.1/en/memory-use.html There is a point mentioned as ...
0
votes
0answers
1 views

Optimisation and Performance Mysql , Zend Framework 2 and Doctrine 2?

i'm facing some problem with performance in an application using zend framework2 and doctrine 2. i would like to optimis it but i don't know from where to start , i read some many questions/ answers ...
0
votes
1answer
25 views

MySQL thousands connections after convert MyISAM to InnoDB on fail-over structure

I've acquired a fail-over structure and I migrated my databases to new structure converting all tables of my database from MyISAM to InnoDB engine, but, after import all databases, I have a problem ...
2
votes
1answer
154 views

Avoiding Multiple Queries when Searching for Records Associated with a Set of Records

So, I am sure I have done something really stupid while designing this, and I'm open to schema changes if they'll really help me out. On to the problem: I have a custom shopping cart system (backed ...
1
vote
1answer
24 views

Simple query hangs on a specific column condition

I have two servers, and I a dumped the database of the first to restore it on the second. Everything works great, except that on the second server, I can't do any selection based on a specific column ...
1
vote
2answers
23 views

mysql service takes too much memory

i have a mysql 5.6.19 on linux server, and it takes about 8 Gb of memory. That is much more than i expect. There are about 150 db, each with 700 tables. All of them are innodb. We do not care about ...
1
vote
1answer
13 views

Shut Down MySQL during InnoDB rollback after crash

I am puzzled once again. We had a server crash last night during some huge queries. Upon restart in the morning MySQL went into recovery mode. I needed to shut down the MySQL service and it is ...
0
votes
0answers
4 views

Creation of insert and update trigger accross database on same server

I have 2 websites and both are hosted on same server with different database and I wanted to create insert and update triggers between tow tables of different database. Example if we consider ...
0
votes
2answers
106 views

How to select the latest record of each hour in a day

I want to select the latest record of each hour in a given date, based on the datetime column 'reading_on' in my table , what is the best way to do it. I already tried group by HOUR(reading_on) with ...
0
votes
0answers
13 views

Insert table column data into another table column in mysql [on hold]

I have to table with category and subcategory. I want to insert category table id into subcategory that have foreign key(category id)using a stored procedure. category table cat_id primary key ...
0
votes
0answers
20 views

MySQL 5.6: explicit_defaults_for_timestamp

I have the following replication topology: DB1 (MySQL 5.5) -> DB2 (MySQL 5.6, explicit_defaults_for_timestamp = 1) -> DB3 (MySQL 5.6, explicit_defaults_for_timestamp = 1) - "date" field: ...
0
votes
1answer
11 views

how to make for each user, documents start in this order 1,2,3… mysql database [on hold]

I need to make database for users and every user have documents which will line up in this order for user1(document1 have id 1, documnet2 have id 2, documnet3 have id 3, etc...) user2(document1 have ...
2
votes
1answer
24 views

3 minutes to import 327Mo database

We do database import a lot of times per day on a server with those specs : Xeon E5-1620v2 4c/8t @ 3,8Ghz 32 Go DDR3 ECC 1600MHz Hard Drive 2x 3 To SATA3 MariaDB 10.14 with XtraDB Given a 327Mb ...
0
votes
2answers
67 views

how to sync local mysql database and live server database?

my plan is to store data in my local mysql database and after a time intervel it will update my live mysql database remotely. Is it possible? i'm planing a inventory management script in php mysql. ...
2
votes
1answer
801 views

MySQL - run SELECT statement on another server without defining the table structure

In MySQL I can query information on another server using federated tables, as long as I've defined the same table structure locally. In MS SQL Server, however, I can run any SQL statement against a ...
1
vote
1answer
11k views

Error Code: 1205 Lock wait timeout exceeded in MySQL

I have set InnoDB lock wait time-out to 120 seconds. When I run the query below for first time, it works fine. However, the second time, the same query with a different value gives me: Error ...
0
votes
1answer
42 views

MYSQL testing string field contains another altered string field

I have this table : mysql> desc mytab; +------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | ...
2
votes
1answer
620 views

Designing database with Category and Tags for Posts - Seeking for guidance/advice

I'm not really a database novice but I'm not an expert either. Problem: I'm having this difficulty on designing my Post, Category and Tags relationship. I've read Normalization many times but could ...
0
votes
1answer
824 views

MySQL PDO Cannot assign requested address

Can someone help me with this error? [08-Apr-2013 17:44:08 Europe/Berlin] PHP Warning: PDO::__construct(): [2002] Cannot assign requested address (trying to connect via tcp://****:3306) in ...
0
votes
1answer
800 views

Table Design - User Management

I have designed a database design for a simple User Management System, this system consist of the following things, User - A user may be a Vendor / Employee / Buyer. User - A user may have more than ...
0
votes
0answers
11 views

Handle a Search on 2 Big Tables

Hello i want to realize a exchange system with 2 tables. 1 Table for "the user is looking for" 1 Table for "the user has to share" the Tables are very simple id bigint user_id bigint object_id ...
0
votes
2answers
112 views

MySQL incremental backups per database (not global)

While searching for free/open-source MySQL incremental backups solutions I have found a number of ways to do incremental backups and all of them seem to either rely on "logical" way of backups/restore ...
1
vote
1answer
172 views

MySQL backing up MyISAM tables by copying the physical files - and automating the process

I have 2 databases with MyISAM tables running on a Windows 2008 Server. These databases are about 20GB in size with a few tables with millions of rows. My question regards backing them up on a weekly ...
0
votes
1answer
15 views

Clarification on MySQL Workbench Options File Configuring

When in the MySQL Workbench tool, configuring the "Options File," I see a drop-down in the lower right corner with the options: client mysql mysqld By default, 'mysqld' is selected and I see my ...
0
votes
0answers
5 views

slave with binlog with performance issues

With some production servers which target to run as HA service, we worry about performance issues which don't appear in a reliable or reproducible way. Sometimes on regular and sometimes on high load, ...
1
vote
1answer
24 views

Is there a data type I can use for RA & Dec in astronomy

I need to have fields in my database for the following: RA (hh:mm:ss.00) Dec (Degrees:arcseconds:arcminutes.00) I need to have the facility to search for a range within each field. Any ideas?
0
votes
2answers
40 views

How can I tune MySQL to behave better under load

We have a typical master-slave set up. When we find ourselves under considerable load, the master grinds to a halt. The slave continues to march along all happy like. So during a recent slow-down, I ...
-2
votes
2answers
32 views

Select data from one table with id from another [on hold]

so as text is saying I need to grab user id by name from one table and then select count from another table by that ID. is it possible? users table ID | User online table ID
1
vote
1answer
43 views

Mysql join table order by index

First Master Table CREATE TABLE `edipostingmaster` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT, `applied` int(11) DEFAULT '0', `fileName` varchar(255) DEFAULT NULL, `checkNo` varchar(100) ...
0
votes
0answers
14 views

MySQL Case always executes the same [duplicate]

What I want to do is to set DATE_REACT a value when the first condition is satisfied, and a different value when the first condition is not satisfied. The problem is that the first condition is ...
0
votes
1answer
33 views

Select Multiple Values from Same Column; one sql statment

I am looking to return a list of users from a database. There are hundreds of users in the db. Each user has it's own unique user_id. All of the values that I am trying to return reside in the same ...
0
votes
0answers
24 views

innodb fulltext Table handler out of memory

I am running mariadb 10 and have a large innodb table with a fulltext index. When searching I am regularly getting this error ERROR 128 (HY000): Table handler out of memory Is there some way I ...
5
votes
2answers
3k views

Running SQL Query on all databases

I have one hosting account using cPanel and phpmyadmin. I have 50 databases under this account, all WordPress. I need this query modified so that it runs through all databases to update the ...
0
votes
0answers
4 views

connecting Pervasive PSQL and MYSQL

I have Peachtree/Sage 50 on the server and trying to sync/integrate with MySQL, I already created a ODBC datasource but how can import all tables in sage to MySQL. What im trying to accomplish is to ...
0
votes
1answer
976 views

Mysql settings for query_cache_min_res_unit

What is the best setting for query_cache_min_res_unit for these results: +-------------------------+-----------+ | Variable_name | Value | +-------------------------+-----------+ | ...
0
votes
1answer
16 views

Find points within a distance using MySQL

I have a MySQL table with State Name,City Name,Zip Code, latitude and longitude of the user. I would like to get a list of user who are inside the circle or square of a given latitude and longitude ...
0
votes
2answers
657 views

MySQL timestamp timezone handling

Does the timestamp data type represent an instant-in-time or a year-month-date-hour-minute-second value? An instant in time is a moment, like the moment you started reading this, and it can be ...
0
votes
1answer
22 views

How do you record & replay mySQL queries for performance analysis?

We would like to record a real workload (i.e. the queries run against the database) so that we can replay the same (web application) workload against a clone of the database with different mySQL ...
0
votes
1answer
17 views

1000 visitors per day have my web page and MySQL scratching at certain times and my.cnf [on hold]

1000 visitors per day have my web page and MySQL scratching at certain times. "tuning primary" and I edit my my.cnf file is as follows. In what way do you optimize it the best I can. nice = 0 ...
0
votes
2answers
106 views

Msg 2627 Violation of PRIMARY KEY constraint

trying to make a database for teams in a tv show here. but when I try and insert data into tblShowteam the following error made its appearance. Msg 2627, Level 14, State 1, Line 2 Violation of ...
0
votes
1answer
27 views

insert row if table is empty, else update row (mysql)

i have 2 tables "table1" and "table2" both have TIMESTAMP cols for starttime and endtime. i want something like if (table2 is empty) insert into table2 (table2.starttime, table2.endtime) value ...
1
vote
2answers
45 views

Perform group by with random group expression (randomly partitioning rows) MYSQL

Let's say I have a table (with millions of rows) cat1|cat2|value A | B| 10 ... and I want to group the data by cat1 and also split the grouping into 10 (at least roughly) equal partitions of ...
0
votes
2answers
36 views

Complex query: find all users who rated all the movies rated by user_id='1234'

So we have the following relational schema: users(user_id, ..) movies(movie_id, ..) ratings(user_id, movie_id, rate) So, we want to find all the users who have rated all the movies which are rated ...
0
votes
0answers
19 views

MySQL master slave replication

I Had mysql master/slave replication working properly but suddenly replication stopped and accidentally someone has changed mysql.binxxx file in salve so i am getting this error ERROR: 'Got fatal ...
1
vote
2answers
162 views

How to duplicate related rows

Tables: Payments with auto-increment ID and one-to-many relationship to Projects such that one payment (say £10) has two records in Projects allocating the £10 between the projects. Now next month, ...
0
votes
1answer
624 views

Inserting query result to another table hangs on “Copying to temp table on disk” on MySQL

I started the process of inserting returned results to another table. The query groups the rows in respect of indexed IDs. This causes 149,000,000 rows to be decreased to 460,000 rows. The query ...
1
vote
1answer
614 views

Slow insert with MySQL full-text index

I use a full-text index in a MySQL table, and each insert into this table takes about 3 seconds. It seems that MySQL rebuilds (a part) of the full text index after each insert/update. Is this right? ...
1
vote
1answer
111 views

Adding foreign keys constraint on databases used

We have a server with about 20 databases, all duplicates of the same original db, and we just noticed the original is missing all the foreign keys constraint for some unknown reason. So of course all ...
0
votes
1answer
54 views

What's faster: two UPDATEs with WHERE (in / not in) or one UPDATE with CASE?

What's best performance wise, two separate UPDATEs: UPDATE table1 SET enabled = 0 WHERE code NOT IN ( SELECT id FROM table2 ); UPDATE table1 SET enabled = 1 WHERE ...
0
votes
1answer
177 views

Restrict access to rows by usename

In my database i store data of different users (e.g. addresses or invoices) in the corresponding tables. I want to make sure that a logged in user only has access to it's own data in the tables (so ...