Tag Archives: mysql

[Solved] Phpmyadmin Vs commandline mysql import

Phpmyadmin allows GUI interface to import but it also depends on the browser because it runs on localhost, that is webserver so when importing huge amount of data the GUI of phpmyadmin seems to freeze, that browser stops responding.

  • If the file is of small size say around 10-20 MB it wouldn’t make any difference but if the file is of huge i.e. around 100+ MB, at that time it makes difference

As a solutions, we can increase the filesize import limit and execution time limit through php.ini.

And the other solution would be to use the mysql command line to import that is very efficient compared to the GUI for import i.e. in phpmyadmin.

The command is

$ mysql -u root -p -h localhost -D "databasename" < import.sql

Then you’ll be asked for password of mysql, supply your mysql password and wait for few seconds/minutes. The amount of time one has to wait depends on the amount of data which is being dumped. The higher the amount of data means higher the waiting time.

When your data has been successfully dumped you will get a command prompt, without any error messages, which means the data has been successfully dumped.

Above command works for both Windows as well as Linux. I have tried importing the 150 MB of file and it took me around 10 sec.

Hope this helps someone.

SMS Banking source-code available in github

This post is continuation of http://www.samundra.com.np/sms-banking-sourcecode-will-be-released-soon/314/

SMS Banking source-code has been released and now you can modify it or use it for your personal use. If you want to use it for commercial purpose bear it in mind that the codes are not so much optimized and no security task been made for sending and receiving SMS through GSM modem.

Remember, the code is not so much documented so feel free to comment on this post, if you think you are going to use this SMS Banking for some purpose.
Github Repository Link Here

Have a nice day

Minor Project SMS Banking in Java

SMS Banking Projects and Locus

We (Asee and Me )have kept stall in LOCUS (http://locus.ioe.edu.np) Room no. 304 and getting nice feedback from the visitors. Our presentation went good and judges seemed to be happy. Volunteers were really very helpful and co-ordination was impressive. Today I knew why IOE students are good, because they have the environment which gives them opportunities to learn and explore themselves.

Since most of the friends have asked for the source-code of the program we thought of releasing the source and making it available for everyone so others can study our code. We agree our code is not so much efficient and hasn’t been well documented but the places were document is most has been documented. If you are thinking on implementing this code for commercial purpose, then we’ll not be responsible for any kind of damage caused by the use of these codes. There is no any kind of licensing. As long as you are happy to use these codes, you are all yourself.

Project on SMS banking requires some knowledge of AT Commands for controlling the GSM/GPRS Modem

Our project requirements are categoriesed into hardware and software.


1. Java Programming Langauge (Download Link)

2. Java Communication API (Please google and find it, start with javaxcomm.zip)

3. Eclipse IDE (Optional)

4. MySql Server (Download Link)

5. Mysql Connector for Java(Download Link)

Softwares listed above are available freely available but we’ll also need a hardware i.e. GSM/GPRS Modem, which costs around Rs. 10,000/- here in Nepal alternative would be to use cell phones that can be controlled through AT Commands.


1. GSM/GPRS Modem

GPRS Modem

2. Connectivity Cable for GSM Modem

We have tested our system in windows and haven’t tested it under linux environment, so you’ll have to manage yourself to get it working under linux environment, let me know if you have any difficulty in setting up, and I will try to assist you as much as I can.

Initial Setup

At first you have to install Java Development Kit ( JDK 7.0 ) then You’ll have to configure Java Communication API, this is the most annoying part of the project, and people find this quite confusing. (See How to configure Java Communication API-not available will write it down soon).

After configuring Java Communication API, you’ll have to install MySql Server in your system, this will be the backend database server for our project.

To connect MySql Server throguh java we’ll need MySql connector/J for Mysql developed by MySql Developers for Java.

(PS How to configure MySqlConnector/J for Java-not available will write it down soon).

Eclipse IDE

We have used Eclipse IDE as our primary IDE for development of this software, as eclipse is quite easy for project management and development tasks and it has got some quite nice features.

bove all are available freely but we’ll also need a hardware i.e. GSM/GPRS Modem, which costs around Rs. 10,000/- here in Nepal. We can also use mobile phones which can be controlled via AT Commands.

Here is the full sourcode for the project Download Full Sourcode Here

Here is the Github repository link

Unicode in PHP and MySql

While I was working with Nepali Unicode in PHP and MySql, I found difficulty in inserting Nepali into database. I made some explorations and found a way to deal with this.

There are some basic things you need to be careful when working with Unicode, especially with database.

The database itself should be encoded in UTF-8 format and whatever is the method to access that particular database, The programming language should be aware that the database is UTF-8 enocded.

The field to store Unicode text should also be changed to<Strong>utf8_general_ci</strong> under collations.

1. How to create database UTF-8 encoded.

a. Start Phpmyadmin, Then enter the database name

Under MySql Connection Collation select utf8_general_ci then hit create.

See the figure below

Database Encode

Database Encode