Kurinchi Blogger Scribbles …


Archive for the ‘MySql’ Category

Nov 19
2009

GUID: Meaning and its application

Last updated: November 19th, 2009

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…)

Aug 19
2009

How to Export Mysql schema, data to Access database?

Last updated: August 18th, 2009

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.

Aug 01
2009

Mysql: How to clear the screen from command prompt?

Last updated: July 29th, 2009

Command to clear the screen content from command prompt in MySQL

mysql> \! clear

Jul 08
2009

Mysql: Test database

Last updated: July 7th, 2009

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…)

Jul 05
2009

Configuring CakePHP in localhost

Last updated: July 9th, 2009

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…)

May 15
2009

MySQL – MyISAM, BSD, InnoDB Considerations

Last updated: May 14th, 2009

MySQL Table Types that are well known
- MyISAM
- InnoDB
- BSD

When making a choice amongst the different types of tables in MySQL, we need to consider the following points

- Size of database based on the activity
- Nature of database access / activity (whether it involves heavy reads / writes)
- Database backup (schema, data)
- Session handling
- If it involves a sync to another database
- What needs to be done if the application is to be scaled
(more…)

May 05
2009

Install MySQL on Ubuntu

Last updated: May 5th, 2009

Steps to install MySQL on Ubuntu Server

After setting up the server, issue the below command to install mysql and its associated libraries

$ apt-get install mysql-server mysql-client libmysqlclient12-dev

Edit MySQL configuration file, to set the IP address that will be dedicated for MySQL.
(more…)

Apr 15
2009

MySQL Create User Grant Rights

Last updated: April 26th, 2009
User creation in MySQL is a simple process. when a “user” is created in MySQL a record gets entered in the DB “mysql” under table “user”. To create a user you need to have the user creation rights or the super user rights. When MySQL is initially installed, root account is created in the database by default with no password to that account. As the root account has all the privileges in the MySQL server, it is advisable to create separate user account(s) for each database.

(more…)

Apr 06
2009

Transfer larger files in email – zip, split, unzip

Last updated: April 6th, 2009

How to transfer mysql backup files across network or emails?

Say for example, you generate a mysql dump called “mysql.dump” from your database the size of which is beyond the file transferable limit of your email account. The following steps will help you in making the file transfer possible (more…)

Mar 06
2009

MySQL Case Sensitivity

Last updated: March 10th, 2009

Is MySQL Case-Sensitive?
The SQL syntax is NOT case-sensitive in MySQL.

If the application written in PHP/Perl or other languages were to be used in Microsoft & Linux environment, then it would really be an issue for the database administrators and for the programmers.

That is the reason why you might have noticed books or sites saying that it is always recommended to treat MySQL syntax as being case-sensitive.

It was interesting to learn that the database name remains case sensitive.


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict