Category: Databases

Add Extra MySQL Root User

To add an extra “root” capable MySQL user start by logging in to the server on SSH and connect to MySQL CLI using an existing “root” level account. Next add the new user account:

Next grant permissions:

Now

Read More »

MySQL – Run Command On All Tables

Here’s a one-liner to run a SQL command on all tables in a database:

Replace “show create table” with the command that you wish to execute. Replace “mydb” with your database name. Replace “root” and “mypassword” with you username

Read More »

Unknown collation: ‘utf8mb4_unicode_ci’

When trying to import MySQL dumps from newer servers to older servers you may get:

or:

The quick and dirty solution is to do a search and replace on the database dump changing “utf8mb4_unicode_ci” and “utf8mb4_unicode_520_ci” to “utf8_unicode_ci”.

Read More »

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.