New answers tagged

2

In a word, no. Why? MySQL Documentation on bind_address says right in the beginning Command-Line Format --bind-address=addr System Variable (>= 5.6.1) Name bind_address Variable Scope Global Dynamic Variable No Permitted Values (<= 5.6.5) Type string Default 0.0.0.0 Permitted Values (>= 5.6.6) Type string Default * It's a global ...


0

What the number 914166 indicates? The number indicates the row of the table where you are trying to insert data. For example, you are trying to insert some values to 914166th row. Why this error occurs? This error occurs because of duplicate value. You are trying to insert/update 914166 to a table activity as a primary key, but the value 914166 already ...


0

If you have autocommit disabled, you're always in a transaction, which would cause the error you see when trying to manage replication... and could prevent you from seeing recent DML depending on the state of your MVCC read view and isolation level.


0

When connecting to Mysql remotely, I got the error. I had this warning in /var/log/mysqld.log: [Warning] IP address 'X.X.X.X' could not be resolved: Temporary failure in name resolution I just added this line to /etc/hosts file: X.X.X.X some_name Problem solved! without using skip-name-resolve, it caused some errors in my local app, when connecting to ...


0

From MySQL manual: DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN GET DIAGNOSTICS CONDITION 1 code = RETURNED_SQLSTATE, error_string = MESSAGE_TEXT; END; I am just not sure about the use of local vs. user variables. User ones are visible for entire session and written in the @var form and if you need them, try to just adding @ to ...


0

The main problem you are hitting is the one on line 8: 160513 0:11:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. You can run the command mysql_upgrade to create the missing table.


0

It's better not to skip by hundreds. Just loop one-by-one: until mysql -e "show slave status\G;" | grep -i "Slave_SQL_Running: Yes";do mysql -e "stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave;"; sleep 1; done


1

Another way you can do this is by summing each criterion by a CASE statement: SELECT market_id, SUM(CASE WHEN a = 1 THEN total_purchase END) AS acc_purchase, SUM(CASE WHEN a = 1 THEN total_profit END) AS acc_profit, SUM(CASE WHEN a = 1 THEN company_profit END) AS acc_company_profit, ((SUM(CASE WHEN b = 1 THEN total_purchase END) ...


3

Explanation First all the JOINing is done. This inflates the number of rows. Then you do a GROUP BY and SUM. Hence, the "unbelievably large numbers". Solution 1 A solution is usually to do the GROUP BY and SUM over just one table. If that can't be done, then find the ids for that one table, dedup them (via DISTINCT or GROUP BY), then do the grouping ...


1

The problems got removed, when i swapped the my.cnf file, with a highly simplified version of it, which was earlier present in a machine, having MySQL 5.6. So possibly the issue was with my.cnf file. # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html [mysqld] init-connect='SET ...



Top 50 recent answers are included