How to create dump in MySQL

Filed in Fedora Core | mysql Leave a comment

FacebookTwitterGoogle+LinkedInTumblrShare

Database: MySQL
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

Dump basically is a copy of the database in SQL file. It is useful as backup or to reconstruct similar database on different server. Replication normally will get a dump from master database and restore in slave database.

To create a dump.

Approach 1: SSH client, use mysqldump and download through FTP client.

Approach 2: Direct mysqldump from your machine.

By default, mysqldump have –opt options which include –add-drop-table, –add-locks, –create-options, –disable-keys, –extended-insert, –lock-tables, –quick, and –set-charset.

But by default, mysqldump does not include –events and –routines.
–triggers is included by default with each table.
–no-create-db is useful if you plan to load the dump under different database name.
–verbose will output to terminal.

For more information please refer to

, , , ,

How to restore dump in MySQL (nohup version)

Filed in Fedora Core | How-to | mysql Leave a comment

Database: MySQL
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

Normally, you will maintain remote database server through SSH client.
Large database dump require long time to restore (few hours).
Disconnect SSH client from remote database server will kill the running process.
Leaving the terminal open until restore the dump completed meaning leaving laptop overnight at office.
Nohup approach allow the process to continue running even if SSH client disconnect from remote server.

, , , ,

How to add new user to MySQL

Filed in How-to | mysql Leave a comment

Database: MySQL

Open terminal. Connect to database using MySQL commandline client.

,

Installing Apache 2.4.4, PHP 5.4.15 and phpMyAdmin 4.0.1

Filed in Database | Fedora Core | How-to | mysql Leave a comment

Web Server: Apache 2.4.4
Intepreter: PHP 5.4.15
Application: phpMyAdmin 4.0.1
Operating System: Linux – Fedora Core 18

Step 1
Install MySQL 5.5.30.

Step 2
Install Apache 2.2.4.

Note

Step 3
Install PHP. php-5.4.15 available from Les RPM de Remi repository.

Note

Step 4
Installing phpMyAdmin 4.0.1.1.

Note

Step 5
If still cannot connect, it can be due to SELinux restriction.

, , ,

Installing MySQL 5.5.30 on Fedora Core 18

Filed in Database | Fedora Core | How-to | mysql Leave a comment

Database: MySQL 5.5.31
Operating System: Linux – Fedora Core 18

Step 1
Install Les RPM de Remi repository.

Step 2
Enable Les RPM de Remi repository. By default, the repository is disabled.

Step 3
Update YUM repository.

Step 4
Install MySQL Client, MySQL Server, MySQL Utilities and MySQL Workbench.

Step 5
Start MySQL Server.

Step 6
Set the root password and secure the database.

Step 7
Testing with MySQL commandline client.

Note

, ,

TOP