Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 71 to 80 of 33492 10 Older Entries
Deleting master logs script ONLY after checking slaves dont need them
+0 Vote Up -0Vote Down

 

You can use this script to purge master logs older than the day of the current log.  It checks the slaves are not using the older logs first. 

 

 

Some prechecks:

 

1) create a repl_client user on each slave - i.e

 

GRANT REPLICATION CLIENT ON *.* TO 'repl_client'@'mk-dbxx-1' IDENTIFIED BY 'r3pl';

 

2) Put the master and slave user, pwd and hosts in the section below.

 

3) Set savedays to number of days of logs to keep if more than today+1.

 

4) Make …

  [Read more...]
Deleting master logs older than one day in a single command
+0 Vote Up -0Vote Down

mysql -uroot –p*** -e 'show master logs; purge master logs before date_sub(now(), interval 1 day); show master logs;' 



sample output

 

 

+------------------+------------+

| Log_name         | File_size  |

+------------------+------------+

| mysql-bin.000325 | 1073741878 |

| mysql-bin.000326 | 532809491  |

+------------------+------------+

+------------------+------------+

| Log_name         | …



  [Read more...]
Moving the whole datamysql base to a new location
+0 Vote Up -0Vote Down

Occasionally, mysql is installed in the wrong filesystem, and as the data build, the filesystem runs out of space. Moving the database is relatively straight forward

 

1.      Ensure there is a good, recent backup. Take an extra backup to be on the safe side

 

2.      Decide where the files will be moved to and create any subdirectories as required. Ensure the permissions are correct

 

            cd /local/mysql

  [Read more...]
Oracle AVDF post-installation configuration
+0 Vote Up -0Vote Down

In one of my last blog, named: "Oracle Audit Vault and Database Firewall (AVDF) 12.1 - installation on VirtualBox" I explained how to install AVDF on VirtualBox. Since some of you asked for a blog on "How to configure AVDF", I decided to write this posting on AVDF post-installation configuration. This one only concerns the post-installation phase, a third blog will be dedicated to practical cases concerning the configuration of Database Firewall Policies.

Specifying the Audit Vault …

  [Read more...]
Everything about MySQL Users and Logins You Didn’t Know and Were Afraid to Ask
Employee_Team +1 Vote Up -0Vote Down

Logging into a MySQL server is generally dead simple—supply a username, a password, and you’re all set!

There are, however, more complex use cases such as when making use of our Enterprise Authentication plugins. It’s also sometimes helpful to have a more detailed understanding of what happens “under the hood”. So I’ll attempt to lift the hood and walk you through all of the nitty-gritty details regarding exactly just what happens when you log into a MySQL server.

Firstly, there are no less than 4 “users” involved in the authentication process. And a distinction between a user id and a user account exists. And it gets more and more …

  [Read more...]
Setting up a MySQL Enterprise Monitor 3 Test Environment
Employee +2 Vote Up -0Vote Down

I wanted to quickly walk through my automated test environment setup for MySQL Enterprise Monitor (MEM). In doing so, I hope to help demonstrate how MEM 3 can easily be managed within an automated environment--whether you're using puppet, chef, cfengine, ansible, salt, $TheNextCoolDevOpsTool, or your own custom shell scripts like I am.

Here's how I setup my test environment:

1. I copy a "fresh" data directory into N locations.
shell# cat createtestenv.sh #!/bin/sh
echo -n "Setting up fresh mysqld_multi setup..." …





  [Read more...]
volatile considered harmful
+0 Vote Up -0Vote Down

While playing with MySQL 5.7.5 on POWER8, I came across a rather interesting bug (74775 - and this is not the only one… I think I have a decent amount of auditing and patching to do now) which made me want to write a bit on memory barriers and the volatile keyword.

Memory barriers are hard.

Like, super hard. It’s the kind of thing that makes you curse hardware designers, probably because they’re not magically solving all your problems for you. Basically, as you get more CPU cores and each of them have caches, it gets more expensive to keep everything in sync. …

  [Read more...]
You can use MySQL for Visual Studio in Visual Studio 2013 Community edition
Employee +1 Vote Up -0Vote Down

A lot a great announcements were done today at the Visual Studio Connect event. And one of the things we are more excited about is hearing that there is a new edition of Visual Studio: Visual Studio 2013 Community.

Log rotate and the (deleted) MySQL log file mystery
+0 Vote Up -0Vote Down

Did your logging stop working after you set up logrotate? Then this post might be for you.

Archive your log files!

Some time ago, Peter Boros wrote about Rotating MySQL Slow Logs safely, explaining the steps of a “best practice” log rotate/archive. This post will add more info about the topic.

When running logrotate for MySQL (after proper setting the /etc/logrotate.d/mysql conf file) from anacron, there’s a situation that you might potentially face if the user and password used to execute the …

  [Read more...]
Preliminary MySQL Cluster benchmark results on POWER8
+0 Vote Up -0Vote Down

Yesterday, I got the basics going for MySQL Cluster on POWER. Today, I finished up a couple more patches to improve performance and ran some benchmarks.

This is on a 3.7Ghz POWER8 machine with non-balanced memory (only 2 of the 4 NUMA nodes have memory, so we have less total memory bandwidth than we could have, plus I’m going to bind ndbmtd to the CPUs in these NUMA nodes)

With a setup of a single replica and two data nodes on the one machine (each bound to a specific NUMA node), running the flexAsync benchmark …

  [Read more...]
10 Newer Entries Showing entries 71 to 80 of 33492 10 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.