Disable ONLY_FULL_GROUP_BY in Mysql on Ubuntu 16
Recently I ran a command in mysql that resulted in this error: So I had to add a line to the mysql config file. In Ubuntu 16: Add the following line under mysqld Restart mysql:
Recently I ran a command in mysql that resulted in this error: So I had to add a line to the mysql config file. In Ubuntu 16: Add the following line under mysqld Restart mysql:
Here is the original /etc/my.cnf file for a default mariadb installation: Location of other .cnf files you can use:
The basic formulas are: Available RAM = Global Buffers + (Thread Buffers x max_connections) max_connections = (Available RAM – Global Buffers) / Thread Buffers To get the list of buffers and their values: Here’s a list of the buffers and whether they’re Global or Thread: Global Buffers: key_buffer_size, innodb_buffer_pool_size, innodb_log_buffer_size, innodb_additional_mem_pool_size, net_buffer_size, query_cache_size Thread Buffers: … Read more
https://support.plesk.com/hc/en-us/articles/213403429-How-to-upgrade-MySQL-5-5-to-5-6-5-7-on-Linux#centos7
Do you wonder which databases are actually taking up how much space but only have one huge ibdata1 in your /var/lib/mysql and the directories inside your mysql data directory don’t represent the actual database sizes? Run from a mysql root console: mysql> SELECT table_schema AS “Database name”, SUM(data_length + index_length) / 1024 / 1024 AS … Read more
Please follow the under mentioned instructions to turn off the MySQL strict mode. Make the following changes in the “my.ini/my.cnf”: Look for the following line: Change it to: or Look for the following line , this line will set MySQL strict mode To disable MySQL strict mode, you can change the above line as follow: … Read more
First – run mysqltuner: Here is what you should do. First run this query This will give you the RIBPS, Recommended InnoDB Buffer Pool Size (in GB)based on all InnoDB Data and Indexes with an additional 60%. After the restart, run mysql for a week or two. Then, run this query: This will give you … Read more
UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’); UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://www.oldurl’,’http://www.newurl’); mysql> UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; Query … Read more
Or from command line
https://www.digitalocean.com/community/tutorials/how-to-measure-mysql-query-performance-with-mysqlslap