Tag Info

Hot answers tagged

2

I assume the * is only for demonstration purposes. You can use GROUP_CONCAT to aggregate strings from several rows into one string. In the example below I only include carname, you probably want some more info: SELECT c.carname , GROUP_CONCAT(p.partname) FROM carparts as cp JOIN car as c ON cp.carid = c.id JOIN parts as p ON p.partid = ...


2

you structure looks good . except that you could merge the amount to the part table . as every part is strictly associates with price. also, only reason you will have duplicate rows is if any of your dimensions tables do not follow strict primary constraints. Car - id (pk) - carname - image - category - status Parts - partid (pk) - partname - ...


1

What catches my eye is the Query recorded in the general log 150629 9:17:14 76946 Query UPDATE `api_dictionaryitem` SET `name` = '', `group_id` = 4, `count` = 2248844, `last_occurence` = NULL WHERE `api_dictionaryitem`.`id` = 8 when you got signal 11 09:17:14 UTC - mysqld got signal 11 ; I would suspect you hit some weird bug when running the ...


1

Yes you can use innodb_file_per_table = 1 for your slaves. Additionally take below points in your consideration If you have same version on MySQL on both Master and Slave. You can directly take backup and setup replication from Master to Slave by adding innodb_file_per_table = 1 on slave in my.cnf Please have a look at How to set Master Slave ...


1

Not knowing what the full relationships are or sample data, try this FK correction first to see if it fixes the problem: SELECT * FROM carparts INNER JOIN car on carparts.carid = car.id INNER JOIN parts on parts.partid = carparts.carpartid INNER JOIN amount on amount.amountid = carparts.amountid WHERE status = 1


1

In MySQL 5.6, mysqldump can do that for you with --dump-slave=1 and --single-transaction. It is the same as --master-data=1, but here is how the log file and position are retrieved: --master-data=1: log file and position from SHOW MASTER STATUS; --dump-slave=1: Relay_Master_Log_File,Exec_Master_Log_Pos from SHOW SLAVE STATUS\G. --dump-slave=1 will run do ...


1

If you want to setup slave from another slave steps would be as follows Flush tables with read lock to lock the slave so it should not get updates show slave status\G and note master co-ordinates Take backup now using mysqldump unlock tables to unlock the slave transfer that backup and restore it to new one Hope you have issues grant replication slave on ...


1

We have few replications in my shop and anytime we stop a master, prior to doing so we stop replication on the slave with: STOP SLAVE;


1

Could you give us some info on the replication config in your config files. For sure if you replicate one db at a time and you need to add one, you won't have a choice to change your config then to restart your instances. If you can I'll suggest more a full replication. less trouble and if you need to add dbs, there is no problem there.


1

I have seen your problem before Problem #1 You have /etc/mysql/conf.d/mycustom.cnf and the log-bin line is not being read Problem #2 Chances are /etc/mysql/conf.d/my.cnf exists and has the following line [mysqld] log-bin=OFF That's why the binlogs start with a filename of OFF Some feel log-bin=OFF disables binlogging. The MySQL Documentation on ...


1

Let's walk through the steps. This will make some of the suggestions so far not significant. Scan 2.6 million rows out of 4-5M. Please verify by finding out how many rows have store_id = 1. Scan 2.6 million rows out of 4-5M again. (Yes, a single pass with an OR would be better since there is no way to make use of INDEX(store_id, data_index), which is ...



Only top voted, non community-wiki answers of a minimum length are eligible