MySQL Administration

The articles about MySQL administration that have previously been posted on this blog are listed below. For quick reference only.

Install MySQL in Mac

This tutorial will assist you in using Brew to install MySQL on a Mac. user@hostname ~ % brew install mysql The above command will help in installing the latest MySQL version available. It will take a few minutes to complete the process. Once installation is completed, run the following command check the mysql version. user@hostname…

mysqldump – extended insert

By default, –extended-insert, -e is enabled when using mysqldump to create backups of MySQL databases. As seen in the example below, the dump file is prepared using multiple-row syntax, and each INSERT statement has several VALUES lists. INSERT INTO `TestTable` VALUES (1,’value1′),(2,’value2′),(3,’value3′); When the file is reloaded, it reduces the size of the dump file…

MySQLDump Backup All Databases Into Separate Files

The mysqldump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It dumps one or more MySQL databases for backup or transfer to another server. The mysqldump command can also generate output in CSV, other delimited text, or XML…

mysqldump: Couldn’t execute ‘FLUSH TABLES’: Access denied

The following error messages are frequently encountered by EC2 instance users, particularly when they lack the privileges necessary to perform a database backup from the RDS MySQL. mysqldump  –no-create-db RetailDB –single-transaction –host MyInstance.rds.amazonaws.com -u auser -pPassword > dump.sql mysqldump: Couldn’t execute ‘FLUSH TABLES’: Access denied mysqldump: Couldn’t execute ‘FLUSH TABLES WITH READ LOCK’: Access denied for user ‘auser’@’%’…

Backup and Restore MySQL databases through Jump servers

The import of MySQL databases using backup files is supported by Amazon RDS. You can back up your database, save it on Amazon S3, and then use that backup file to restore your database onto a fresh Amazon RDS DB instance running MySQL. The databases can be backed up and restored using this method if…

MySQL Generated Column

Virtual and stored generated columns are both available in MySQL. Every time data is read, the virtual columns are calculated instantly, but when data is updated, the stored columns are calculated and physically saved. This is equivalent to a calculated column in SQL Server that is either virtual or physically stored. An expression that is part…

MySQL Generated column from another table

No, if this is what you are trying to achieve, then it isn’t supported in any SQL product. Sometimes we may require a generated/computed column in MySQL that references other tables. However, this isn’t supported and not a practical solution to have a reference of another column. The following code will return a syntax error.…

Leave a Reply