MySQL

To create and manage MySQL databases only over the command line can be quite challenging. You may know to the browser-based tool “phpMyAdmin”, but this tool has some limitations (e.g. no visual data base design)
To overcome this problem, you can download the MySQL Workbench from https://www.mysql.com/de/products/workbench
Install the program, start it and add your database credentials using the plus right to “MySQL Connections”. Caution, maybe not every database can be accessed directly throw the internet, many databases listen only to localhost for security reasons. If this is the case, use Standard TCP/IP over SSH to let MySQL Workbench to create an SSH tunnel for you.
Now you can use the MySQL Workbench to create and manage your databases.

Technology:

How to connect to a MySQL database from Perl?

Taggings:

How to manage MySQL databases with an easy to use GUI?

import excel data table into database with only phpMyAdmin access

In a specific table in a MySQL database a column needed to be populated with thousands of different values depending on a row-ID. The row-ID and value pairs could be found in an excel file / table. No direct access to MySQL was possible, only the import function of phpMyAdmin could be used.

Joins are more expensive than a pure concatenation. In your case maybe UNION or UNION ALL might be a good solution because it parses the first SELECT statement and moves on to the next SELECT statement and adds the results to the end of an output table. The finding of the different connections of the joined tables is a huge cost factor.

Using joins (mySQL) in a query

Actually in a web application performance has a huge influence on usability. So I often use joins in my queries to provide compact sql queries. But queries with many joins have a bad performance and the user have to wait for a long time. Is there a better opportunity to provide a better performance?

Optimizing SQL Queries

In a typical university course, performing an SQL query was always a fast thing. However, when you are working on a project that grows over time, you at first might not give the performance of a query much thought. As the project grew, I had complex queries and lots of records in the database, distributed over many tables. What I didn't expect, was that from one day to another, the performance of the page went from zero complaints to constant user complaints (the page loads too slowly). As I found out way later, the bottleneck comes suddenly. It does not build up. And at that point I was stressed and had to do an overnight shift, dealing with temporarily shutting down the users and optimizing the backend queries (take a look at the JOINS, and narrow it down as much as you can). For future reference I know that I will give SQL query performance way more attention, and as the query complexity and database size grows, you should in the same step perform a check how the performance scales.

First, the Site Address and the WordPress address need to be updated. Go to Settings->General in the WordPress administration area and change the value of these two settings to the new URL. New contents are now created with HTTPS.

Unfortunately, changing the site address does not update URLs in existing contents, so a SQL-Statement to replace the old URLs with new one is required (replace example.org with the URL of the site to move):

UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.example.org', 'https:// www.example.org)

Mapping taxonomy terms from Drupal 5 to Drupal 7

In Drupal 7 tagging terms are stored as fields of the entity. In previous Drupal versions tags are assigned to nodes stored in a table taxonomy_index(nid, tid, created). In D7 we have some table as for example field_data_field_taggings were each term refrerence is stored as a row. If more then one term is assigned to a content node (e.g. in the answers module), the value in the column delta incremented to have a unique key. To generate this table we need an sql statement that increments this delta if more than one term exist for the node.

Pages

Subscribe to MySQL