Archive

Posts Tagged ‘database’

Oracle Database 10g Express Edition

May 20th, 2009

Oracle Database 10g Express Edition
Free to develop, deploy, and distribute

Oracle XEOracle Database 10g Express Edition (Oracle Database XE) is an entry-level, small-footprint database based on the Oracle Database 10g Release 2 code base that’s free to develop, deploy, and distribute; fast to download; and simple to administer. Oracle Database XE is a great starter database for:

* Developers working on PHP, Java, .NET, XML, and Open Source applications
* DBAs who need a free, starter database for training and deployment
* Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge
* Educational institutions and students who need a free database for their curriculum

With Oracle Database XE, you can now develop and deploy applications with a powerful, proven, industry-leading infrastructure, and then upgrade when necessary without costly and complex migrations. Read what users say about Oracle Database XE.

Oracle Database XE can be installed on any size host machine with any number of CPUs (one database per machine), but XE will store up to 4GB of user data, use up to 1GB of memory, and use one CPU on the host machine.

After installation, be sure to register for an exclusive Oracle Database 10g Express Edition Discussion Forum hosted by Oracle expert Tom Kyte—click on the “Registration” link on XE’s Database homepage.

Camilo III Info.Tech, Software Development, Web Development , , ,

Visual C#: Connecting to MySQL remotely

April 13th, 2009

I have a current project that connects to a remote database server using Visual C# as client window application. So before I started my project, I tested it if it is possible to connect and the result, it does connect. For those does who failed to solve this problem, here’s my tutorial/guide.

Test Project Requirements:

  • VMware Workstation 5.5
  • CentOS 4.4
  • Visual C# Express Edition
  • MySQL Data Connector .Net v1.0.7

Scenario:

The client’s OS is MS Windows XP and the server is CentOS Linux. The client will connect to the Linux server to query and process some transaction. But in the sample code, it demonstrate only how to connect remotely in the server. My server’s IP address is 192.168.10.117 and a MySQL port of 3306 (default port).

Screenshots:

mysqlRemote1.jpg

Step 1:

Setup the Linux server, be sure you already installed MySQL server. In our case, we use VMware and a CentOS 4.4 is installed. For installation help, google it! :P The first thing to do is configure your IP tables by using iptables command. see illustration below;

iptables1.jpg

If your configuration does not allow foreign connection to your MySQL, then change that and allow it. In real scenario if your server is public, I recommend that you must have a new server which can only be access through local network. Or if cannot afford, just setup well the IP tables that only local connections are allowed. Anyway, here’s my new IP tables setup in my server;

iptables2.jpg

In MySQL CLI, create a user that can access everywhere. To do this, see sample below;

mysql> GRANT ALL PRIVILEGES ON *.* to ‘beasaw’@'%’ IDENTIFIED BY ‘qwerty’;

Explained: the command shown above is to allow user, beasaw, to access anywhere using a password qwerty.

That’s it… server setup completed. :D

Step 2:

Before you create a new project in VCS, test first the connection using the command;

C:\> mysql\bin\mysql --host=192.168.10.117 --port=3306 --user=beasaw --password=qwerty

See image below;

cmd_mysql.jpg

Step 3:

  1. Open your Visual C# and create a new project, name it to remoteMySQL.
  2. In Form1.cs, layout just like the screenshot above.
  3. Add a reference, MySql.Data.dll (assumed that you already installed the MySQL data connector .Net v1.0.7)
  4. Add mysql to the project: using MySql.Data.MySqlClient;
  5. Begin your codes, see sample code (download link below)… :P

mysqlRemote2.jpg

That’s it… You can create as many applications you want with this method. Like Ticketing System, connecting 10 terminals to the servers simultaneously and etc. And of course, connection varies also to your MySQL server setup. :D

Download:

» VCS Remote Connect to MySQL Server (61)

Camilo III Info.Tech, Software Development, Visual C# , , , , , ,