MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
22 views

Synchronize part of the tables to use offline (no internet use) then sync back to server [on hold]

I read some synchronization post but seems not suit my case. As I will sometimes go travelling locally and other country which I may have no access to internet then I could not even get the data in my ...
0
votes
0answers
31 views

Moving datadir OK start, but socket error for mysql client

I'm trying to move my MySQL datadir from /var/lib/mysql over to /home/mysql (an ssd drive as I'm having iowait issues on /var/lib/mysql when MySQL is running on that drive). The OS is CentOS 5.6 ...
1
vote
1answer
31 views

for what My mysql server get mr than 2 gig RAM on my vps?

imnot know english very well so sory for my bad dictation on my vps that has 4 gigabyte RAM and 4 core CPU and 220 gig HDD . i haved installed centos basic server 6.5 x64 and virtualmin last version ...
0
votes
1answer
32 views

MySQL add few column exception for TRIGGER UPDATE FOR EACH ROW

How to effectively add column id, name exception for trigger: CREATE TRIGGER updated BEFORE UPDATE ON table1 FOR EACH ROW SET NEW.date=NOW() so that date=NOW() will be affected on updating any ...
0
votes
0answers
10 views

Logging all user actions

I'm creating a community-driven project and, of course, I want to be protected against spam or evil users. In case of undesirable changes in the DB I would log all users' actions ...
0
votes
2answers
22 views

MySQL get values from the other table by using inner joins

In mysql I have 3 tables called as ps_product_lang ps_order_detail and ps_image here are the tables sample data === ps_product_lang === CREATE TABLE IF NOT EXISTS `ps_product_lang` ( ...
0
votes
0answers
28 views

Result of query not showing in phpmyadmin

I have a 500,000 row database that I am running a reasonably complex query on: SELECT yfog, (SELECT AVG(yds) FROM pbp_yards_gained p2 WHERE p2.yfog=p1.yfog AND type = ...
0
votes
0answers
14 views

Pasting into PHPMyAdmin

This is probably really simple but I have had a look on the web but can't seem to find an answer. I am experimenting with MySQL + PHPMyAdmin on a WAMPserver stack and was saving queries in Excel When ...
1
vote
1answer
68 views

Reducing execution time for this gnarly SQL

I'm creating an order system of some kind. There is a function that I use to get orders (in PHP) and retrieve the required information about the order. However, it seems that I am pulling a lot of ...
0
votes
0answers
18 views

What is safe way to restore mysql database?

When database is online. I want to restore dump file to it. Here is my plan: set global read_only=ON use root with super_priv to drop all databases do restore all databases set global read_only=OFF ...
0
votes
0answers
15 views

How does database connection actually works? [duplicate]

I am wondering, on a practical level : what is a database connection? What does it represent for PHP/Java/Ruby/etc to have an opened connection for instance? What about the MySQL deamon? Does it ...
0
votes
1answer
33 views

How to compare all rows in a table and extract data using triggers

I have two table one table stores the gps data of various users another table stores the idle time of the users based upon the gps data of latitude and longitude values and timestamp difference. ...
0
votes
1answer
29 views

How to sum the buy order and sell order in one row per each ticker

I have a table containing some trading information of several tickers and I would like to divide the data into sum(Amount) for buy and sell separately, grouping by each ticker. I have one table ...
-1
votes
0answers
45 views

How to select record with biggest value of column [migrated]

Columns: numberIWant, value I would like to get numberIWant number of records, which have biggest value. select max(value) from myTable only returns the max value. I want to find numberIWant that ...
1
vote
2answers
29 views

Why is MySQL ignoring my indexes?

I have a query select distinct id from patient where company_id in (1) and (name_last like 'peter%' or name_first like 'peter%' or remote_id like 'peter%') running on a table that looks like this ...
0
votes
3answers
40 views

Select rows where 2 cells not the same

I have the following table: +----+-------+---------+---------------+ | id | owner | variant | EAN | +----+-------+---------+---------------+ | 1 | 101 | black | 1111111111111 | ...
0
votes
0answers
15 views

mysqld: page allocation failure. order:3, mode:0x20

I've been running a mysql server in production for some time, lately the db has been locking up at around 10:30 every day. There's no cron jobs running at that time or anything like that, and I'm at a ...
0
votes
0answers
12 views

MySQL replication: Understanding content of binlog

I am using MySQL replication with GTID. I did mysqlbinlog to see some binary log. This is a section in binary log that I am considering: SET @@SESSION.GTID_NEXT= 'servre-uuid:248283'/*!*/; SET ...
2
votes
1answer
33 views

MariaDB ALTER TABLE produced a separate .ibd file, how can I re-integrate the data into the shared table space?

We have a multi-GB InnoDB MariaDB (recently switched from MySQL). For some reason, the value of innodb_file_per_table changed to ON (we wanted only one innodb data file explicitely). So when I ran an ...
0
votes
1answer
23 views

How can I get the user not to be listed twice?

I'm using the following query to list best times in a race. This works perfectly well but someone does the best record twice (for example, they finished the race in 15 seconds twice) they being listed ...
1
vote
0answers
22 views

Problem when using gtid with MySQL replication

I have faced to problem when using gtid in MySQL replication: "When @@SESSION.GTID_NEXT is set to a GTID, you must explicitly set it to a different value after a COMMIT or ROLLBACK. Please check ...
1
vote
1answer
14 views

Mysql: Problem using GREATEST with IFNULL and join

I have a query selecting the greatest value of 2 timestamp. To Achieve it I'm calling: SELECT GREATEST( IFNULL( tableb.create_time, 0 ) , IFNULL( tablea.create_time, 0 ) ) I'm using IFNULL because ...
1
vote
2answers
19 views

MySQL After Update Trigger apparently not running

I have the following After Update trigger on a MySQL table: CREATE DEFINER = 'root'@'localhost' TRIGGER phpbb_rathermenacing.phpbb_bbdkp_memberlist_AUPD AFTER UPDATE ON ...
1
vote
1answer
19 views

Can I change max_allowed_packet for a MySQL database, but not others in the same instance?

We have a MySQL server with multiple databases in the same instance. Can I change the max_allowed_packet value for just one of the database? From looking at this, it seems SET GLOBAL ...
0
votes
1answer
13 views

How can I find duplicate key violations in a different collation?

I have a MySQL table that has the collation for one of its varchar columns in the primary key set to utf8_general_ci. I want to change the collation to utf8_unicode_ci so it stops treating "gmail.com" ...
0
votes
0answers
27 views

SOLVED:MySql: how do I insert a large data set into existing rows automatically?

I'm revising a static website and striping via grep all links, titles, etc. to put into my mysql database. Since it's 400+ links/titles, I just load the text file of titles and then links with a ...
0
votes
0answers
31 views

MySQL replication working, but data is out of date

I'm trying to figure out why even though SHOW SLAVE STATUS isn't reporting any errors, nothing is replicating (see below): both nodes are running: mysql> SELECT VERSION(); +------------+ | ...
0
votes
0answers
12 views

MySQL upgrade steps - review

I read the MySQL upgrade documentation and the upgrade questions in stack exchange and have a fairly good understanding at this point. I am an accidental MySQL dba and this is my first upgrade and ...
0
votes
0answers
13 views

MYSQL Stored Procedure Problem. Need Help

MySQL Stored procedure: Delimiter $$ DROP PROCEDURE IF EXISTS spGetCompanyNames $$ Create procedure spGetCompanyNames (IN Employer nvarchar(75), Out Employer_Namee nVarchar(75)) begin Select ...
0
votes
1answer
81 views

Splitting Columns

I want to ask a complicated question and I think its advanced a little. I have a table has this design, its an attendance system. I need to split the time if the attendance count per day was not 2: ...
0
votes
0answers
27 views

MySQL select query runs forever in Toad

I'm trying to run a simple SELECT query in Toad (for MySQL 7.2.0.2922). SELECT * FROM sometable When I click execute (or press F9) a small timer shows up in the status bar (bottom right) and it ...
-1
votes
1answer
34 views

mysql database performance issue [closed]

I have a 2x Xeon Quad Core E5410 2.33 GHz with 24 GB of RAM. running 5.5.31 with the following my.cnf file. It supports lots of reads and writes and transactions(all INNODB). Are there any obvious ...
1
vote
0answers
20 views

Can I include extra columns in a m->m mapping table? [duplicate]

I guess this is sort of an odd question, but consider this scenario. table classes (id_pk) table students (id_pk) table students_classes_map (students_id_fk_pk, classes_id_fk_pk, finalExamScore ...
1
vote
1answer
36 views

select query on unique column AND alternate column of “aliases”

I have a MySQL table (~10,000 rows) with a pk id (int) column and a name (varchar) column (as well as a few other unimportant columns for this question). The name column contains unique values that ...
2
votes
1answer
43 views

MySQL Replication - Master Master - Single Master write

I am looking to improve our fault tolerance for our persistent store. After reading several online docs about how to set-up master <> master replication, I'd still like to ask the experts about the ...
0
votes
0answers
19 views

Conditional value lists in MySQL

apologies in advance if the language I use here is insufficiently specific. Please let me know if there's anything that I can clarify. Does MySQL provide a means of creating conditional value lists a ...
1
vote
1answer
27 views

MySQL 5.6.17 running out of memory when opening table with many partitions

We are currently setting up a MySQL database (version 5.6.17) on an Amazon db.m1.large RDS instance for storing time series data. Each time series property of an object is stored in a separate InnoDB ...
0
votes
1answer
21 views

Connecting to MYSQL on an EC2 instance

I'm trying to use Zapier to connect to our MySQL database in order to add results from forms (hosting with WordPress) directly into our internal database. The database is working properly and so are ...
0
votes
1answer
21 views

Restoring Mysql Table From ibdata1, ib_logfile0, ib_logfile1 (without frm)

How to recover an innodb table that only left with ibdata, ib_logfile0 and ib_logfile1 without any frm file? Thanks
1
vote
1answer
27 views

MySQL: Merge Same Database on Several Location into Single Location

I have registration form, which exactly same for several location. Each of them has REG column, which this field is unique for each row. Basically each data input have different REG number for it, ...
1
vote
1answer
5 views

Not able to update MySQL table using Oracle: Unknown column in 'where clause' {42S22,NativeErr = 1054}

I have the following tables: MySQL table: jti_member_interact CREATE TABLE `jti_member_interact` ( `INT_MEMBER_ID` int(11) NOT NULL, `INT_ID` int(11) NOT NULL AUTO_INCREMENT, `INT_SOURCE` ...
0
votes
0answers
17 views

Text comparison select query needed that finds most whole word matches within larger string

I have a database of products, many with similar names. For example... iPhone 5s (GSM model) A1533 iPhone 5s (GSM model China) A1518 iPhone 5s (GSM model China) A1530 iPhone 5c (GSM model) ...
1
vote
0answers
39 views

Efficient query involving union and virtual/derived table [migrated]

Both of these mysql queries produce exactly the same result but query A is a simple union and it has the where postType clause embedded inside individual queries whereas query B has the same where ...
0
votes
1answer
25 views

Does column size increase break SELECT *?

I searched a little bit on this topic before realizing it is somewhat tricky (for me, at least) to come up with an effective search phrase for it because it overlaps with other common topics. So here ...
0
votes
1answer
36 views

mysql hardware refresh + version upgrade

currently I am running MySQL 5.0.80 on windows server 2003 (x64), 64gb memory, I have a master and 2 slaves. It's a large 400 gb Database. I am setting up all new hardware (SAN + dedicated MySQL ...
1
vote
1answer
26 views

Fetch data from same table using two group by clauses in mysql

I have one table name as consultant with 4 fields(id, name,user_type, Created date). I need to write an mysql query for return the count of user_type in each month. In my table, user_type is ...
0
votes
0answers
19 views

Markup Languages and SQL Queries

I need to store some metadata in an MySQL database. This data will need to be stored in some form of markup language and reside in a 'meta_data' field on a table. I will need to run searches ...
1
vote
1answer
21 views

How to sort words in a column in mysql?

I have data as id action 1 a 1 b 2 b 2 a 3 c I wrote code as select id,group_concat(action SEPARATOR ' ') from table1; It ends up as id action 1 a b 2 b a 3 c Actually, ba and ab ...
2
votes
1answer
45 views

Wordpress blog where pages are almost-always served from cache: SSD or more RAM?

I am working on the design of a Wordpress blog which when finished will almost-always serve pages from disk cache and this is because all posts will be published in batch and then cached, with at ...
1
vote
1answer
33 views

MySQL: Find ID with only 2 attached IDs in subtable

I've got 2 tables. 1 containing my Threads and 1 containing the users attached to these threads. I want to find the ThreadID with 2 specific UserIDs attached, no more no less. This is what I've come ...