MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
37 views

How to restart mysql slave node?

i have 8 slave servers and i need to restart one of them but in my.cnf file master-host, master-user etc. variables dont exists. So if i restart server as indicated here replication will start again?
0
votes
1answer
762 views

mysql view with user variables

I have a query that calculate distance from point a to point b using gps coordinates, and would like to make it view. Is it posible to pass variables that will replace xxx and yyy in my query with ...
0
votes
1answer
175 views

What is the best partition technique for large table with TEXT column?

MySQL: What is the best partition technique for large InnoDB table (around 1.5M rows) with TEXT type of column? There is a FULLTEXT index on the TEXT column, which is very essential for my searching ...
0
votes
1answer
233 views

What will be the best mysql configuration for 12 core processor 128 gb ram ssd 160gb hdd

What will be the best mysql configuration for 12 core processor, 128 GB ram sized 160gb HDD. Mysqltuner.pl result! -------- General Statistics -------------------------------------------------- [--] ...
1
vote
1answer
4k views

Recursive Query in MySQL using stored proceedure and CURSOR

I'm expanding our user/group system to allow for dynamic groups which are made up of other groups members. I have three tables users, groups, and relationships. For simplicity sake, lets say users ...
2
votes
0answers
62 views

Count how many locks required for a MySQL (InnoDB) query

I'm performance tuning a very data-heavy mysql application. It has a purge system that often seems to cause lock timeout errors for users. Based on my research I have a few adjustments to the query to ...
0
votes
1answer
8k views

MySQL: split value in column to get multiple rows

I have some data in a table like so: product_id categories 10 9,12 11 8 12 11,18,5 I want a select statement that would produce this output: product_id ...
0
votes
1answer
65 views

How do I reduce time spent “preparing”? [closed]

I have a query I need to make more efficient. Trying a couple different things, one of which is SHOW PROFILE . That shows that the most massive timesink by far is "preparing". As far as I understand, ...
0
votes
2answers
577 views

MySQL Replication Master push to Slave

I have two servers that need to be synced. One is online and has a public IP address. The other is internal and has no public IP address - nor is there a way to get it a public IP so that's off the ...
0
votes
1answer
48 views

MySQL: Algebra in Union operation

I have below query: select entity_id from table1 exc UNION select entity_id from tabl2 inc On execution, I got 24419 rows. When I execute select entity_id from table1 exc I got 16235 rows and on ...
1
vote
0answers
157 views

Issue with MySql upgrade from 5.1 to 5.6 for Jboss SOA - p v 4.3

We are using JBoss SOA P v- 4.3, we have recently upgraded Mysql version to 5.6 from 5.1 and are facing some issue with the jboss start up. We are using MySQL instead of Hypersonic database for Jboss ...
0
votes
1answer
4k views

Inserting all csv files into a table in mySQL?

I am looking for a way to insert all my csv files into mySQL without having to write several "LOAD DATA INFILE" statements as I have many csv files I need to insert and the files themselves are very ...
1
vote
1answer
32 views

Request shown in slow logs

In my MYSQL configuration I activated logging of request not using indexes. slow_query_log=1 slow_query_log_file = /home/mysql/sqlprive.log long_query_time=7 log_queries_not_using_indexes =1 But ...
1
vote
1answer
162 views

How to get the last inserted id using scope identity without using a stored procedure in Mysql?

My project contains 2 tables one is profile_table and another is address_table Profile_ table contains: +------+---------+----------+ | sid | sname | saddress | +------+---------+----------+ | ...
0
votes
1answer
71 views

Please tell me my data isn't gone… lie to me even

In a moment of ignorance I setup my webserver to auto backup all data to another machine. not a problem except I just mearly cp -R /var/lib/mysql so all I ended up getting was hundreds and hundreds ...
1
vote
1answer
354 views

Native replication from Percona XtraDB Cluster to a standard stand-alone slave

I'm replicating from one node of a three-member Percona XtraDB cluster to a separate slave, using regular MySQL replication. The node is set to write binlog in ROW mode, with log_slave_updates=true ...
0
votes
1answer
61 views

MySQL: join query

I've got the following two tables: mysql> DESC domains; +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra ...
2
votes
1answer
390 views

Optimize table and query, aggregate by date or date-hour

I have a table storing sensor data (100M rows currently) from stations from different sites. In my case, sites may have many stations. Create table statement is as follows: CREATE TABLE sensor_data ( ...
0
votes
0answers
34 views

What Index can I apply to a GROUP BY, MIN() and WHERE MySQL Query

I have the following table: CREATE TABLE `wp_prize_draws_log_copy` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL, `entry_date` date NOT NULL, `entry_time` datetime ...
0
votes
1answer
373 views

MySQL: Procedure for mysql certification

I have keen interest in database and since start of my career I worked only in MySQL. But, I have not any professional certification related with MySQL. I have below concerns for certification: Any ...
0
votes
1answer
183 views

How to model complex database role relationships

The purpose of my application is the creation, viewing and editing of articles. The problem I have is that users will have different roles for an article or group of articles. In addition, the role ...
1
vote
0answers
504 views

Prepared statement execution with variable number of parameters to be bound

Some stored procedures I work with need to interpolate WHERE criteria based on if procedure input parameters have been supplied. To avoid potential injection points, I'd like to utilize parameter ...
0
votes
1answer
2k views

Using count in triggers to update another table

Say i have a table called trx_request with the following data id | confirmed(TIME) | finished(TIME) ------------------------------------- 1 | 12:05:00 | NULL 2 | 13:11:00 | NULL and ...
0
votes
2answers
272 views

Copy On Write Transparent database for MySQL

It is possible to create a transparent database to another production database server? I mean, testing new functions in a production database is too dangerous. What if we create a database which based ...
1
vote
0answers
376 views

MySQL Space efficient way of storing indexed key-value pairs associated with table

We're storing transactions in an accounting system using two tables, one contains the general description of the particular transaction (the other contains the entries, one for each account - which ...
0
votes
0answers
435 views

Optimize tables & schemas & sql query - mysql

I have a mysql querying the following tables: CREATE TABLE `products` ( `id` int(11) NOT NULL AUTO_INCREMENT, `page_id` int(11) NOT NULL DEFAULT '0', `category_id` int(11) NOT NULL, ...
0
votes
1answer
78 views

Column to Row and Vice Versa

I need to create a new table by combining the contents of two different tables. Is there any way to transform columns into rows and rows into columns in MySQL? I tried using JOIN but I can't seem to ...
1
vote
1answer
77 views

Counting number of visitors who did NOT log in

I'm trying to calculate the number of visitors to the homepage of my site who did NOT then log in to the member's section of the site, while also filtering bots and admin users. Bots and admins are ...
1
vote
0answers
177 views

MySQL aggregation count performance

I have a table with about 30 million records, and I'm doing a query where I can group by field Year and count the results for that year. The table structure looks like: id | year | amount The ...
1
vote
2answers
178 views

Automobile database logic [closed]

I am building a web based quoting system for a local automobile dealership. I think I have figured out the logic for the databases but I want to get a second opinion before I start just to make sure ...
2
votes
1answer
3k views

How to set up multiple fields as primary key in MySQL?

I have a table with fields EmployeeID blahblah blahblah2 ..... RecordMonth RecodrdYear so each employee should only have a matching entry for a month, year, Emp#. How do I set up a table. ...
0
votes
2answers
5k views

MySQL count multiple columns and sum the total occurrence

I have the following table, say, MyDRAW ... DRAWNO PRIZENO FIRSTD SECONDD THIRDD FOURTHD M123/14 8458 8 4 5 8 M123/14 7214 7 2 1 4 M123/14 1640 1 6 4 0 ...
0
votes
1answer
119 views

What is the most efficient way to update a product table with 1 million rows in MySQL

I need to update a product table which currently has 1 million rows. For each row, I need to perform an expensive http operation and then update 1 field in the row based on a returned header. I've ...
2
votes
1answer
2k views

Mysql error 28 no space left on the device

I keep running in to the same problem with mysql with error code 28 which means there is not enough space left on the device. Now the weird part is that there is enough space, here are some tips i ...
1
vote
1answer
212 views

Mysql down on my server (log files)

I have server (on DigitalOcean) with LAMP + site with wordpress 3.8.1. Sometimes my MySQL server down. I try to plug swap, and it helped sometime (fo example when pst publishing) but sometime my site ...
0
votes
0answers
1k views

The total number of locks exceeds the lock table size, even after increasing buffer pool size

I am trying to partition a table with 200 million records in it. This table already exists: CREATE TABLE linkmap_ntoken ( target_nToken varchar(200) NOT NULL, ntoken_hashcode int(15) NOT NULL, ...
0
votes
1answer
635 views

mysql cluster table full error

I installed a new mysql cluster on windows (for evaluation). I created a table using command below. After I insert just over 1 million records into the table it gives me the "table datadump is full" ...
0
votes
0answers
495 views

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Im trying to to dump an old database system to migrate the data. # mysql --version mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2 The weird part is this: # mysql -u ...
-1
votes
1answer
337 views

Error in upgrade_from_array - mysql: 1064 query: DROP TABLE IF EXISTS filling tables

Error in upgrade_from_array - mysql: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'myhandyrestaurant' ...
1
vote
1answer
153 views

Scheme review/Normalization level/query optimization

So I have a relatively complex database I'm designing - basically full in-house accounting setup. In one section I have some concern that I'm over-normalizing; the 'directory' - I'll example the ...
0
votes
1answer
56 views

Why is the index not used?

When I run the following querys in MySQL: SELECT count(*) FROM Inventory AS i WHERE i.lastModified > 1389920146804 or SELECT i._id FROM Inventory AS i WHERE i.lastModified > 1389920146804; ...
2
votes
2answers
2k views

Is it possible to index a computed column used in ORDER BY?

I am having problems with my mysql server, because of not properly written queries. I did not use indexes, because I do not know how to add them on computed columns, in a query that has SELECT ...
0
votes
1answer
1k views

Recover an Innodb mysql database from an EBS on Ec2

My instance crashed on AWs, and i had to create a new one and mount my Vol that contain my web application and the Mysql Database. After i stoped the Mysql Server i mounted the vol and also mounted ...
2
votes
1answer
1k views

How to determine MySQL queries per day?

I'm investigating the big switch from MySQL to a NoSQL DBaaS and I've run into an issue trying to forecast expenses. Essentially, I can't figure out how many queries my current MySQL server handles ...
0
votes
2answers
1k views

What is the last Mysql Version supported in REDHAT 6?

Maybe not such a good question ! But my Linux admin is to busy to answer my doubts. SO: I have all my Mysql servers running on 5.1.69 version(the free one) that comes with RedHat O.S. My users are ...
0
votes
1answer
856 views

row-based replication with slave triggers

I'm replicating a prod MySQL database to an analytics one. I need to drop several tables with sensitive data from the analytics and also redact several columns of several remaining tables, replacing ...
0
votes
1answer
327 views

MySQL: What is SQL mode and why we use it

If in an application, if we execute sql_mode=mysql4.0 as a first query in my application but using MySQL 5.1 in my application then what will happen? Will my system use MySQL 4.0 or MySQL 5.1 ...
1
vote
2answers
303 views

Why does MySQL + Windows Server = crashed tables periodically?

Windows Server 2008 R2 x64 MySQL Server 5.6.14 x64 Is anyone else having an issue in where some tables are marked as crashed on a Microsoft Windows server? We have a couple of Windows servers (not by ...
0
votes
1answer
463 views

MySQL crashes daily on VPS with Ubuntu Server 12.04 - How can I find the error or conflict?

Every day for the past four days, my website server crashes at least once. (Error establishing database connection. As long as I catch it, I simply have to do the following command: sudo ...
1
vote
3answers
3k views

revoking mysql table level privileges

I have a mysql user account who has following Global privileges GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK ...