Archive for the ‘MySql’ Category

May
20
2010

MySQL GUI tool for Data Management

HeidiSQL - a comprehensive tool for MySQL management which is available for Free.

Manage data tables, export/import databases, synchronise tables between databases, integrity check, database backup service management, edit database content and many more features packaged as a solution for ALL your MySQL needs.

This runs on windows platforms – WinXP/XP7 and you can download HeidiSQL from Download link
(more…)

  • Share/Save/Bookmark
Apr
28
2010

Backup Types

Full backup
Full backup is process of backing up ALL data.
First step towards all other types of backup
Backup time will be longer
Restore operation takes less time

Differential backup
Differential backup is the process of backing up data that has changed since the last FULL backup.
Requires file maintenance as the backup file will be of similar size or larger than its previous backup
Longer backup time than incremental backup
Faster restoration than incremental backup

Incremental backup
Incremental backup is the process of backing up data that has changed since the last Full, Incremental or Differential backup
Takes lesser backup time as it will have small data to archive
Takes longer restoration time

Mirror backup
Mirror backup is similar to full backup and is a direct copy of the files/folders
Files are not compressed in zip files and are not protected with password. They remain the mirror or exact copy of the source.

  • Share/Save/Bookmark
Apr
05
2010

How to import mysql dump (.gz or .sql) into a database?

When moving mysql database from one server to another or, to test that the data backup works as expected we need to import mysql dump file in the testing environment.

Create the database (test-database) in the testing environment and identify the location of the .gz or .sql file.

If the mysql dump was a .gz file, you need to gunzip to uncompress the file by typing
$ gunzip mysqldump.sql.gz

This will uncompress the .gz file and will just store mysqldump.sql in the same location.
(more…)

  • Share/Save/Bookmark
Mar
12
2010

Ubuntu: Configure PHPMyAdmin in Simple Steps

$ sudo apt-get install phpmyadmin

For versions 7.10 and up, choose “Apache 2″ from the screen “Configuring phpmyadmin”

If everything goes fine, you can access phpmyadmin from
http://servername/phpmyadmin

If you have created users in MySQL, you can use those credentials to log into the database. The basic admin account is “admin” with no password.

Phpmyadmin defaults to requiring you to login after 1800 seconds of inactivity.

» MySQL Create User, Grant Rights http://kurinchilamp.kurinchilion.com/2009/04/mysql-create-user-grant-rights.html

  • Share/Save/Bookmark
Feb
05
2010

MySQL: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

Reason why this error might occur:

i) Incomplete MySQL implementation
ii) MySQL setting mis-configuration

Solution:

root@myserver:/# vi /etc/mysql/my.cnf

Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces
#bind-address = 127.0.0.1

root@myserver:/# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 17785/mysqld

Note that above line which indicates MySQL listening on all interfaces.

  • Share/Save/Bookmark
Nov
19
2009

GUID: Meaning and its application

GUID stands for “Global Unique Identifier” and is a term usually referring to Microsoft’s implementation of unique identity number (in a distributed environment) that it generates to identify different entities such documents, COM’s, DLL’s, interfaces, records, and other objects. It is also known as UUID – Universal Unique Identifier interchangeably.

GUID implemenation is a 128 bit (16 byte) value consisting of sets of hexadecimal digits separated by hyphens. As the total number of unique keys is large the probability of two numbers being the same is very small.

The AutoNumber datatype in MS-Access and the Identity datatype in SQL Server is a GUID implementation.
(more…)

  • Share/Save/Bookmark
Aug
19
2009

How to Export Mysql schema, data to Access database?

In order for you to export data from MySQL to Access database, you need to first download MySQL ODBC connector from

http://dev.mysql.com/downloads/connector/odbc/3.51.html

(Choose MSI installer from the downloads section and install it in your machine)

After installing MySQL ODBC connector, you need to configure ODBC connector in order connect MySQL database.

1. Choose Start > settings > Control Panel > Administrative Tools. Then double click on Data Sources (ODBC)

2. Click System DSN and then press “Add” button. There will be a dialog asking you to choose new data source. Choose MySQL ODBC 3.51 driver and click Finish

3. Next you need to fill in the details that will enable ODBC drive to open the database of your choice. Give a name for the data source (e.g. MyDSN), Server name (e.g. localhost), User (e.g. sqlusername), Password (password for user sqlusername) and the name of the database to which you want to connect to in MySQL

4. Click the Test button to ensure everything works fine and as expected.

5. The DSN “MyDSN” gets created for you when you click the “Ok” button.

6. Now, go to Access and create a database (e.g. MyAccessDB)

7. In Access, click “File > Get External Data > Import > and then choose “ODBC Databases” from “Files of Type” option. This will open a new dialog window asking you to “Select Data Source”

8. From the new dialog window, choose “Machine Data Source“. This will display the DSN “MyDSN” which you have created earlier. Choose that DSN and click “Ok” to import the database from MySQL to Access database.

  • Share/Save/Bookmark
Aug
01
2009

Mysql: How to clear the screen from command prompt?

Command to clear the screen content from command prompt in MySQL

mysql> \! clear

  • Share/Save/Bookmark
Jul
08
2009

Mysql: Test database

Ever wondered why there is a “test” database in the list of tables when you install MySQL.

This is to allow users to practice MySQL commands or execute complex queries on the database.

“test” database is accessible to everyone who has access to MySQL in your localhost and hence is not advisable if you were to use it for your development. (more…)

  • Share/Save/Bookmark
Jul
05
2009

Configuring CakePHP in localhost

Quick and easy steps

Grab a copy of cakePHP from cakephp.org website

You can either create the new cakephp website in the root (http://localhost/) or by adding it as a subfolder (http://localhost/mycakesite/)

If you create it as a subfolder, then configure the appropriate path settings for linking images in the web pages.
(more…)

  • Share/Save/Bookmark