MySQL & MariaDB

Get help with MySQL and MariaDB Database Servers. AGIX Linux staff have the know-how and experience to help your organization with Database Server best-practices, current technology in various Cloud environments including Amazon AWS. This page shows examples of our work that AGIX Linux shares freely with you. For a fully supported compute environment, contact our team to find out how we can help your organization move forward in the right way.

See Our Blogs on MySQL & MariaDB

Import data into AWS’s MySQL – clean it first

You’ve dumped a DB from MySQL and didn’t use the “–no-triggers” option. Now you’re trying to import your data into RDS MySQL which complains that: ERROR 1227 (42000) at line xxx: Access denied; you need (at least one of) the SUPER privilege(s) for this operation You can solve this by

How to find where MySQL puts error logs

MySQL will use the “/etc/my.cf” file to learn where to put its error log file. However, if you don’t specify it, you don’t have access to the filesystem or you’re simply confused, try this. First log into MySQL and then run the following: mysql> show global variables like 'log_error'; +---------------+--------------------------------------+

Dump and Backup all MySQL Databases into their own files

This article demonstrates how to backup all MySQL databases into their own files and then tar the lot including system files. #!/bin/bash TO="/root" FROM="/etc /var/www/html /var/backups" DBUSER="root" DBPASS='MyPassword' THISHOST=`hostname` DBLIST=`echo "show databases;" | mysql --password=$DBPASS -u $DBUSER | egrep -v '^Database$|^information_schema$|^mysql$'` for DBLOOP in `echo $DBLIST` do mysqldump -u $DBUSER

Restore a single MySQL DB from a Dump using –all-databases

The link below shows a simple way to restore one the MySQL database that you want from a dump that included all databases. Extracting a Database From a mysqldump File The good people who wrote that article (can) take credit for the following: shell> sed -n '/^-- Current Database: `mydb`/,/^--

Install a MySQL client for Mac

Actually there are several to choose from. We’ll go with “Sequel” for this tutorial. Download it from here: https://sequel-pro.googlecode.com/files/sequel-pro-1.0.2.dmg The Sequel is a GUI based tool but still allows you to run queries, browse data, etc.

Interacting with MySQL using PHP with OpenShift

This article shows how to use PHP to access a database from within OpenShift. In this case the PHP code is accessing the MySQL database within the same application. function db_connect() { $db_username = getenv('OPENSHIFT_MYSQL_DB_USERNAME'); $db_password = getenv('OPENSHIFT_MYSQL_DB_PASSWORD'); $db_host = getenv('OPENSHIFT_MYSQL_DB_HOST') . ":" . getenv('OPENSHIFT_MYSQL_DB_PORT'); $db_name = "mydbname"; $conn =

Populating MySQL Within OpenShift

This document explains how to populate a MySQL database within OpenShift. In this example we have an application with three gears; HAProxy, PHP and MySQL. We have RHC configured. We have the SQL dump file available via http but it could be by ftp or ssh. First we connect to

Get the size of MySQL databases

This is a one-liner that will show you the size of your MySQL databases. This works for RDS MySQL databases. Having logged into your MySQL server as the root user: SELECT table_schema "Database Name", sum( data_length + index_length ) / 1024 / 1024 "Database Size in MB" FROM information_schema.TABLES GROUP

Reset a lost MySQL Password on CentOS and Redhat Linux

Use these instructions to reset a lost MySQL root password. I’ve taken these steps from the website “http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password”. All credit to them. Note that this is done as the ‘root’ user. First stop MySQL and start it in ‘safe mode’: service mysqld stop mysqld_safe --skip-grant-tables & Now login without the

Create a new MySQL user, grant permissions and set the password in one command

This one-liner shows how to create a new MySQL user, grant permissions and set the password: GRANT ALL PRIVILEGES ON mydb.* To 'myuser'@'%' IDENTIFIED BY 'mypassword'; Then run: FLUSH PRIVILEGES And that’s it.

Need Help?

"*" indicates required fields

Our Team Is Made Up Of Australian Specialists

Need Help?

Click Here
Call Now Button