Quantcast
Channel: MySQL – BigSmoke
Browsing index pages (16 articles)

Upgrading Roundcube on Ubuntu 18.04 and Ubuntu 20.04

What a mess… After postponing this for many months because I knew what awaited me, I double-upgraded an Ubuntu 18.04 server today, and aside from MySQL breaking in some spectacular ways (corrupt redo...

View Article


Image may be NSFW.
Clik here to view.

Taking control of the wpautop filter

WordPress does automatic paragraph formatting using the wpautop filter, some PHP code originally developed by Matt Mullenweg. For most of the time that this blog has existed, I’ve disabled the wpautop...

View Article


Writing a Magento 2 module

[This post is a work in progress.] Between the more […] Magento 2 MVC C = Controller: URL routing V = Block/Template/Layout M = Model

View Article

G.B.D. Calamari Joomla and phpBB upgrade

As the chairman of G.B.D. Calamari, a Dutch student diving association, it falls to me to upgrade an aging Joomla configuration that is a relict of the last time that the board was chaired by somebody...

View Article

Decreasing shutdown time of MySQL with large transaction log file

If you need/have a large transaction log file, a shut down can take a while. This post lists how you can force a flush before you do so, decreasing shut down time. In short: mysql> set global...

View Article


Dumping MySQL users and grants

MySQL stores its users and grants in a very annoying, non-clonable format. I found this post, describing how you can extra them. This bash function generates grants: mygrants() { mysql -B -N $@ -e...

View Article

Trying to reduce MySQL InnoDB disk usage after major reduction of data

So, two days ago, I tried to shrink my MediaWiki database and it almost worked, except the MySQL process wouldn’t shrink along with it. Of course I tried all the obvious things such as dropping the...

View Article

Image may be NSFW.
Clik here to view.

Shrinking/compressing a MediaWiki database

As of late, I haven’t had a lot of time to chase after spammers, so – despite of anti-spam captchas and everything – a couple of my wikis have been overgrowing with spam. One after the other I’ve been...

View Article


Converting all tables in MySQL DB to InnoDB

#!/bin/bash   exit 1   dbname="eorder"   echo 'SHOW TABLES;' | mysql $dbname | awk '!/^Tables_in_/ {print "ALTER TABLE `"$0"` ENGINE = InnoDB;"}' | column -t echo 'SHOW TABLES;' | mysql $dbname | awk...

View Article


Listing MySQL table sizes

This query lists the sizes of all tables in MySQL: SELECT TABLE_SCHEMA, TABLE_NAME, CONCAT(ROUND(data_length / ( 1024 * 1024 ), 2), 'MB') DATA, CONCAT(ROUND(data_free / ( 1024 * 1024 ), 2), 'MB')FREE...

View Article

Converting a MySQL database from latin1 to utf8

mysqldump dbname > dbname_bak_before_messing_with_it.sql mysqldump --default-character-set=latin1 --skip-set-charset dbname > dump.sql sed -r 's/latin1/utf8/g' dump.sql > dump_utf.sql mysql...

View Article

Getting a better MySQL prompt

When you want to see which user you are and which database you’re working with, put this in .my.cnf: prompt=(\\u@\\h) [\\d]>\\_ Too bad mysql doesn’t support color. You can make it work with rlwrap,...

View Article

Image may be NSFW.
Clik here to view.

Taking control of the wpautop filter

WordPress does automatic paragraph formatting using the wpautop filter, some PHP code originally developed by Matt Mullenweg. For most of the time that this blog has existed, I’ve disabled the wpautop...

View Article


Image may be NSFW.
Clik here to view.

Ytec, WordPress and Aihato.nl

On Oktober, the 25th, in what will be known to future generations as a historical move, Wiebe changed the A record of www.aihato.nl to point to the new production site running at Ytec. The new site, a...

View Article

Making mysqldump work on a zimbra installation

Zimbra installs its own mysql and there is no workable mysqldump command. There is a mysql command wrapper script (/opt/zimbra/bin/mysql) that loads an environment to set password and such, but there...

View Article


Show privileges for mysql users

(source) To show one users privilges in mysql: SHOW GRANTS FOR 'luser'@'localhost'; To list current users grants: SHOW GRANTS; Show all users: select user,password,host from mysql.user;

View Article
Browsing index pages (16 articles)


Latest Images