Skip to main content

Posts

MySQL privileges and replication

This is a response on MySQL security: inconsistencies and Less known facts about MySQL user grants . As far as I know the privilege to grant PROXY privileges is also not very well understood. I blogged about that some time ago. In addion to the already highlighted issues with GRANT replication and grants can very well create an unwanted situation: master> SHOW GRANTS FOR 'user'@'host'\G *************************** 1. row *************************** Grants for user@host: GRANT USAGE ON *.* TO 'user'@'host' IDENTIFIED BY PASSWORD '*4994A78AFED55B0F529C11C436F85458C1F8D4C2' *************************** 2. row *************************** Grants for user@host: GRANT SELECT, INSERT, UPDATE, DELETE ON `somedb`.* TO 'user'@'host' 2 rows in set (0.00 sec) master> GRANT SELECT,INSERT,UPDATE,DELETE ON anotherdb.* TO 'user'@'host'; Query OK, 0 rows affected (0.00 sec) master> SHOW GRANTS FOR 'user'@'host...

Regularly flushing the MySQL Query Cache without cron

This is a reply on Regularly flushing the MySQL Query Cache . The original acticle is about regulary flushing the MySQL Query Cache as it will fragment over time. There are some drawbacks for the cron method for flushing the query cache: It will only work on UNIX like platforms as MS Windows uses the task scheduler to schedule tasks. It needs credentials to login to the database. It's not included in your database backup There is another method, which is native to MySQL: the event scheduler . Step 1: Enable the event scheduler: mysql> SET GLOBAL event_scheduler=ON; Query OK, 0 rows affected (0.00 sec) And don't forget to set/change this in your my.cnf or my.ini Step 2: Create the event: mysql> CREATE EVENT flush_query_cache ON SCHEDULE EVERY 1 HOUR DO FLUSH QUERY CACHE; Query OK, 0 rows affected (0.00 sec) mysql> SHOW EVENTS\G *************************** 1. row *************************** Db: test Name: flush_query_cache Definer: msandbox@localhos...

OSS-DB Database certification

What will be first? The new and updated MySQL certification or the new OSS-DB exam which is announced by LPI in Japan? The OSS-DB is only for PostgreSQL for now, but will cover more opensource databases in the future. There seem to be two levels: Silver: Management consulting engineers who can improve large-scale database Gold: Engineers who can design, development, implementation and operation of the database The google translate version can be found here . I found this info on Tatsuo Ishii's blog

RE: A bit on SANs and system dependencies

This is a reply on A bit on SANs and system dependencies by Eric Bergen. Lets first start by making a difference between entry level, midrange and high-end SAN's. Entry level: This is basically a bunch of disks with a network connection. The Oracle/Sun/StorageTek 2540 is an example for this category. This storage is aimed at lowcost shared storage. Midrange: This kind of storage generally features replication and more disks than entry level. HP EVA is what comes to mind for this category. This storage is aimed at a good price/performance. High-End: This is mainframe style storage which is made usable for open systems. Hitachi Data Systems VSP is a good example of this category. This category is for extreme performance and reliability. Please make sure to not (mis-)judge High-End SAN by the experiences you had with entry-level storage. Why should we use SAN/NAS storage? SAN's can offer more reliable storage than local storage SAN's offer all kinds of extra services like re...

MySQL Certification

According to the Oracle website the following certifications are available for MySQL: Oracle Certified Associate, MySQL 5.0/5.1/5.5 Oracle Certified Professional, MySQL 5.0 Developer Oracle Certified Professional, MySQL 5.0 Database Administrator Oracle Certified Expert, MySQL 5.1 Cluster Database Administrator There were two new versions released since MySQL 5.0. MySQL 5.0 was released in 2005, that's more than 5 years ago. And "MySQL 5.1 Cluster Database"? According to wikipedia the NDB release in the 5.1 source tree is old and not maintained. And Cluster 7.1 has many new features like multithreaded data nodes and disk based data. So Oracle, please update the certifications.

My MySQL wishlist (revised, again)

 Just like I did in 2007 and 2009 , this is my updated whishlist for MySQL. My 2007 List: Per user and/or per database quota I guess that this will be implemented together with catalog support.   External Authentication  Got it in 5.5! Thanks a lot! And the new MySQL Cluster even has support for sharing user credentials .   Database Locator There is still no TNSnames like support. Saving extra metadata about the database. Using the comment field of tables for things like svn release, customer number and more still just feels wrong. And a database still can't have a comment... Using I_S is possible, but it's not supported to create FK's for that, so consistency is not guaranteed. better protection against run-away queries With mk-kill this is now easy. restore manager I still have to use thinks like awk for this... My 2009 List: SNMP for statistics no changes   SNMP for alerting MySQL Enterprise Manager is quite good at this. Auditi...

Explaining what the default PROXY privilege for root does

In a default MySQL 5.5.8 installation there is one PROXY privilege: GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION What this does is: If USER() and CURRENT_USER() don't match root is still allowed to grant the proxy privilege. So if you connect using someuser@localhost using LDAP and LDAP tells you're root then you're still allowed to grant proxy privileges. This will only work if your user has the privilege to proxy to root. The documentation for PROXY is here .