Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 39 10 Older Entries

Displaying posts with tag: howto (reset)

HowTo: Retrieve Direct Messages From Twitter and Store Them in MySQL
Employee_Team +1 Vote Up -0Vote Down

In two earlier posts, I gave some examples on how to use Perl to send tweets stored in a MySQL database to Twitter, and then how to automatically reply to your retweets with a “thanks”. In this post, I will show you how to automatically download your direct messages from Twitter, store the messages in a MySQL database, and then delete them.…

MySQL 5.7 with JSON and Connector/Python
Employee +0 Vote Up -0Vote Down

In this post we will use the MySQL 5.7.7 labs release which has support for JSON documents stored in a special data type. We will be using Connector/Python and show how to get going with updating documents and getting data out.

Required read

If you wonder what this is all about, please check the following great reads from the MySQL Server team:

  [Read more...]
Best Howto posts on Scalable Startups
+0 Vote Up -0Vote Down

Join 28,000 others and follow Sean Hull on twitter @hullsean. MySQL slow query on RDS If you run MySQL as your backend datastore is there one thing you can do to improve performance across the application?. Those SQL queries are surely key. And the quickest way to find the culprits is to regularly analyze your […]

MySQL Connector/Python on GitHub
Employee +1 Vote Up -0Vote Down

Last week we released Connector/Python v2.0 (alpha); today we publish the source on GitHub. Yes, we are using Git internally and are now able to push it out on each release. Previous versions are still available through LaunchPad.

Here is the full process to get Connector/Python installed in a virtual environment. You’ll need Git installed of course.

shell> git …
  [Read more...]
How To - Guide to exporting data from Excel to a new MySQL table
Employee +0 Vote Up -0Vote Down

There may be times when you need to create a new table in MySQL and feed it with data from another database, the Internet or from combined data sources. MS Excel is commonly used as the bridge between those data sources and a target MySQL database because of the simplicity it offers to organize the information to then just dump it into a new MySQL table. Although the last bit sounds trivial, it may actually be a cumbersome step, creating ODBC connections within Excel through Microsoft Query may not help since these are normally created to extract data from MySQL into Excel, not the …

  [Read more...]
Snippet: Show column information using MySQL Connector/Python
Employee +1 Vote Up -0Vote Down


You have a query executed by MySQL Connector/Python and would like to show column information nicely on the console.


Every cursor object has a description property. This can be used to show information about the columns in a result set.

columns = []
maxnamesize = 0
for coldesc in cur.description:
    coldesc = list(coldesc)
    coldesc[2:6] = []
    namesize = len(coldesc[0])
    if …
  [Read more...]
Working with comma separated list MySQL options
+1 Vote Up -0Vote Down

Over time, some options have crept into the MySQL server which are comma separated lists of options. These include SQL_MODE, optimizer_switch, optimizer_trace and a few other variables.

Optimizer_switch is particularly problematic to work with as it contains many options and is hard to interpret. This is what you usually see when you examine optimizer_switch:

  [Read more...]
Using Connector/Python with SQLAlchemy
Employee +4 Vote Up -0Vote Down

SQLAchemy has support for MySQL Connector/Python for a while now. Here is a little HOWTO showing how install both, and setup a database engine.

There are multiple ways of installing both projects, but here is the simplest using pip, whatever platform you use:

shell> pip install SQLAlchemy
shell> pip install mysql-connector-python 

Start your SQLAlchemy engines using a URL pointing to …

  [Read more...]
How to Drop the Trigger
+2 Vote Up -1Vote Down

If we speak about MySQL triggers, does anybody need a "Howto" on this topic? It must be simple if you know the trigger name to drop, just use DROP TRIGGER, as manual explains:

mysql> use test
Database changedmysql> select current_user();
| current_user() |
| root@localhost |
1 row in set (0.00 sec)
mysql> show triggers\G
*************************** 1. row ***************************

  [Read more...]
How to use PERFORMANCE_SCHEMA to check InnoDB mutex waits
+4 Vote Up -0Vote Down

SummaryTo set up InnoDB mutex waits monitoring via PERFORMANCE_SCHEMA in general with MySQL 5.6.9 you should do at least the following:

  1. Start MySQL server with all mutex related instruments enabled at startup (performance_schema=ON by default on recent 5.6.x), like this:

    mysqld_safe --performance_schema_instrument='wait/synch/mutex/innodb/%=on' &
  2. Connect to server and set up proper consumers explicitly, like this:

    UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name like 'events_waits%';
  3. Run your problematic load. …

  [Read more...]
Showing entries 1 to 10 of 39 10 Older Entries

Planet MySQL © 1995, 2015, 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.