Since MySQL 5.5, MySQL has supported the utf8mb4
character set. With the character-set defining the
repertoire of characters that can be stored (utf8mb4
can present Unicode characters from U+0000 to
U+10FFFF), a collation defines how sorting order and
comparisons should behave.…
Somebody asked on Freenode. I don’t know why they wanted it. How would you drop all MySQL users who do not have “GRANT ALL ON *.* … WITH GRANT OPTION”? That is, drop any users who have ‘N’ in any of the privilege columns in `mysql`.`user`.
My solution shown below. Did you think of a different approach?
I used SQL to build SQL which built more SQL. Get the list of ‘priv’ columns from information_schema.columns. Build a query that looks for ‘N’ in any of those columns (it feels funny to search for a constant in a list of fields instead of a field in a list of constants, but it’s perfectly legal). Use the results to build the DROP USER statement.
mysql -BNe "SELECT CONCAT('SELECT CONCAT(''DROP USER '', QUOTE(user), ''@'', QUOTE(Host), '';'') FROM mysql.user WHERE ''N'' IN (', GROUP_CONCAT(column_name), ')') FROM information_schema.columns WHERE table_schema = 'mysql' AND …[Read more]
Welcome to another post in the series of Percona Live featured session blogs! In these blogs, we’ll highlight some of the session speakers that will be at this year’s Percona Live conference. We’ll also discuss how these sessions can help you improve your database environment. Make sure to read to the end to get a special Percona Live 2017 registration bonus!
In this Percona Live featured session, we’ll meet Evan Elias, Director of Engineering, Tumblr. His session is Automatic MySQL Schema Management with Skeema. Skeema is a new open source CLI tool for managing MySQL schemas and …
[Read more]Intro
In my previous blog post I told you to use SSL/TLS to secure your MySQL network connections. So I followed my advice and did enable SSL. Great!
So first let's quickly verify that everything is working.
So you enabled SSL with mysql_ssl_rsa_setup, used a
OpenSSL based build or put ssl-cert,
ssl-key and ssl-ca in the mysqld
section of your /etc/my.cnf and now show global variables
like 'have_SSL'; returns 'YES'.
And you have configured the client with
--ssl-mode=PREFERRED. Now show global status
like 'Ssl_cipher'; indicates the session is indeed
secured.
You could also dump traffic and it looks 'encrypted' (i.e. not readable)...
With SSL enabled everything should be safe isn't it?
The handshake …
[Read more]The MariaDB project is pleased to announce the immediate availability of MariaDB 10.1.22. This is a Stable (GA) release. See the release notes and changelog for details. Download MariaDB 10.1.22 Release Notes Changelog What is MariaDB 10.1? MariaDB APT and YUM Repository Configuration Generator Thanks, and enjoy MariaDB!
The post MariaDB 10.1.22 now available appeared first on MariaDB.org.
Introduction Dealing with time zones is always challenging. As a rule of thumb, it’s much easier if all date/time values are stored in the UTC format, and, if necessary, dealing with time zone conversations in the UI only. This article is going to demonstrate how you can accomplish this task with JDBC and the awesome … Continue reading How to store date, time, and timestamps in UTC time zone with JDBC and Hibernate →
The TEXT and VARCHAR definitions in many db schemas are based on old information – that is, they appear to be presuming restrictions and behaviour from MySQL versions long ago. This has consequences for performance. To us, use of for instance VARCHAR(255) is a key indicator for this. Yep, an anti-pattern.
VARCHAR
In MySQL 4.0, VARCHAR used to be restricted to 255 max. In MySQL 4.1 character sets such as UTF8 were introduced and MySQL 5.1 supports VARCHARs up to 64K-1 in byte length. Thus, any occurrence of VARCHAR(255) indicates some old style logic that needs to be reviewed.
Why not just set the maximum length possible? Well…
A VARCHAR is subject to the character set it’s in, for UTF8 this means either 3 or 4 (utf8mb4) bytes per character can be used. So if one specifies VARCHAR(50) CHARSET utf8mb4, …
[Read more]Percona announces the release of Percona XtraDB Cluster 5.6.35-26.20 on March 10, 2017. Binaries are available from the downloads section or our software repositories.
Percona XtraDB Cluster 5.6.35-26.20 is now the current release, based on the following:
- Percona Server 5.6.35-80.0
- Galera Replication library 3.20
- wsrep API version 26
All Percona software is open-source and free. Details of this …
[Read more]In this blog, I will provide answers to the Q & A for the Troubleshooting MySQL Access Privileges Issues webinar.
First, I want to thank everybody for attending the February 23 webinar. The recording and slides for the webinar are available here. Below is the list of your questions that I wasn’t able to answer during the webinar, with responses:
Q: Should the root@localhost user be given ALL privileges or Super privileges? Does All include Super privileges also?
A: Yes, you should have a user with all privileges. Better if this …
[Read more]So you’re interested in the “new” MySQL Group Replication feature but are concerned that configuring it is going to be difficult. Let me soothe those concerns with this blog post. Yes, the MySQL team has recently been discussing other methods to configure Group Replication using the RC release of MySQL Shell and how it can be used… Read More »