Starting with MySQL 5.6, MySQL commercial-license builds use OpenSSL. yaSSL – previously used as the default SSL library for all builds – remains the implementation for Community (GPL) builds, and users comfortable building from source can choose to build with OpenSSL instead. Daniel van Eeden recently requested a global variable to indicate which SSL library was used to compile the server (bug#69226), and it’s a good request. It’s something I’ve previously requested as well, having been fooled by the use of have_openssl as a synonym for …
[Read more]The MySQL general query log can be a useful debugging tool, showing commands received from clients. In versions through MySQL 5.5, you could count on the GQL to log every command it received – the logging happened before parsing. That can be helpful – for example, the GQL entries might have records of somebody unsuccessfully attempting to exploit SQL injection vulnerabilities that result in syntax exceptions.
Here’s a sample, which I’ll run in both 5.5 and 5.6 and show the resulting GQL:
mysql> SELECT 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) mysql> SELECT NOTHING(); ERROR 1305 (42000): FUNCTION NOTHING does not exist mysql> SELECT 2; +---+ | 2 | +---+ | 2 | +---+ 1 row in set (0.00 sec)
In 5.5, this produces the following in the general query log:
130513 18:26:34 1 Query SELECT 1 130513 18:26:40 1 Query SELECT NOTHING() 130513 18:26:44 1 Query …[Read more]
MySQL 5.6 introduces a number of new features designed to improve
the security of MySQL. There's the new
master_info_repository
variable that lets you store
replication connection information in a table instead of a lowly
text file, new warnings telling users that they should use
SSL/TLS, there is a new option to give replication user &
password with START SLAVE
instead of CHANGE
MASTER
, and there's mysql_config_editor
to
encrypt passwords. The problem with these features is that they
are a form of Security through Complacency: these things make you
feel more secure, but the realistic benefits disappear behind the
curtains of Security Theater as soon as an even
marginally-determined intruder comes along. In this post, I'll
look at some of the new security features in MySQL 5.6 and,
however well-intentioned they may be, the danger of relying on
these features.
…
[Read more]
There are many thing changed in MySQL 5.6 which are related to
passwords:
- There is a new password hash algorithm (SHA-256)
- There is obfuscation for passwords with the .mylogin.cnf file.
- The option to store slave passwords in a database table.
- It's now possible to supply a password to START SLAVE.
But that's not what this blog post is about.
This blog post is a great new feature: Hiding passwords from your
log files, automatically.
MySQL 5.6 will by default hide passwords from the general log.
This is not just obfuscation as only the one-way hash will be put
in the log files. By setting log-raw=OFF you can disable password
hiding for the general log. The log-raw setting will only
influence the general log, so the passwords in the slow query log
and the binary logs will still be hidden.
With MySQL 5.5 this could be done manually by …
Take 50% Off COLLABORATE 13 Now Through Wednesday But you’ve got to act fast! If you’re not already one of the many joining the IOUG at COLLABORATE 13 – IOUG Forum, sign up today for your chance at attending for … Continue reading →
I am very excited and thrilled to use the latest release of MySQL 5.6 in production. This is probably the most notable and innovative release in many years, if not ever.
During the last year, we had the chance to work with many new features and test the fixes to old issues. To be honest, I was expecting to have MySQL 5.6 GA before now, and I even wagered with my colleague Francisco that it would be out before the end of 2012. It was nothing special, just a beer in the Santa Clara Hyatt lounge. Unfortunately for me, MySQL 5.6 is now in GA and given that it happened in 2013, I lost the bet and now have to pay for that beer. But I have also lost the full list of things that we saw as relevant, interesting, or really innovative for MySQL.
So I took a step back, took some time, and reviewed what Oracle delivered in this new MySQL release.
Short premise
Oracle developer teams did great work for …
[Read more]In a world driven by computers, most companies rely on systems that are entirely built around databases. Losing data, or even as little as losing the full control over it, could bring any business down. Frequently databases hold sensitive information such as personal details, transaction statements, credit card data – among many other things. This is also why running certain types of databases is regulated in many countries by local as well as international laws – especially in Europe.
What is at stake?
- Availability. When a database or data disappear, business stops. Assuming you have working backups you can restore from, this is the least of all concerns.
- Confidentiality. Your secrets, private information of your customers and anything else that you decided not to make publicly available may be leaked.
- Privacy. Personal …
If for any reason you couldn’t attend my talk at FOSDEM earlier today on improving MySQL security, I have already uploaded the slides. You can download them from here.
I’m getting more and more concerned about the current Oracle approach to MySQL security. And the fact that I was solely responsible for the security@mysql.com for about ten years, doesn’t make it easier, on the contrary, it only emphasizes changes in the attitude.
Starting from the obvious — somewhat slower response to critical bug fixes, which can be expected, Oracle is a big company, right? Very little information about security vulnerabilities is disclosed, CPUs are carefully stripped from anything that might help to understand the problem, it takes hours to map them to code changes. Heck, even test cases are kept private now. This seriously smells …
[Read more]
What happens when you use the PASSWORD() function to insert a
password hash into a table?
- The hash will be written to the table
- The password might be written in clear text to the binlog
- The password might be written in clear text to the general log
- The password might be written in clear text to the slow query log
The query
mysql [localhost] {msandbox} (test) > INSERT INTO testpwd(pwd) VALUES(PASSWORD('secret_password'));
Query OK, 1 row affected (0.00 sec)
The General log
130128 16:04:41 1 Query INSERT INTO testpwd(pwd) VALUES(PASSWORD('secret_password'))
The Slow query log
# Time: 130128 16:04:41[Read more]
# User@Host: msandbox[msandbox] @ localhost []
# Query_time: 0.004887 Lock_time: 0.001043 Rows_sent: 0 Rows_examined: 0
SET …