software
To get data from POST body in PHP
This may look a very simple and small piece of code, but it took me ages to work on this one and get it in a proper format hence thought of sharing it with all. I used this line of code to get the data from POST body. I hope this will help you with your PHP Development.
file_get_contents(‘php://input’);
Introduction to HTML 5 (part 1 of 10)
HTML 5
HTML is always considered as one of the important aspects of web development. Here, we are discussing about HTML5.
HTML5 which is currently under development is the next major revision of the HTML standard. Like its immediate Predecessors HTML4.01 and XHTML 1.1 , HTML5 is a standard for structuring and presenting content on world wide web.
This new standard incorporates features like video playback , drag and drop , geolocation, data storage , visiting websites offline , forms and many more.
Here is a brief history of HTML5.
HTML5 which is currently under development is the next major revision of the HTML standard.
There was never any such thing as HTML 1
The first official specification was HTML 2.0, published by the IETF, the Internet Engineering Task Force.
Later on the role of the IETF was superceded by the W3C, the World Wide Web Consortium, where subsequent iterations of the HTML standard have been published.
In the latter half of nineties HTML 4.01 was published.
After HTML 4.01, the next revision to the language was called XHTML 1.0
The content of the XHTML 1.0 specification was identical to that of HTML 4.01. No new elements or attributes were added.
The only difference was in the syntax of the language.
Valid XHTML 1.0 document requires all tags and attributes to be in lowercase. All attributes must be quoted.All elements must have a closing tag.
These rules were similar to that of XML.So they were moving towards XML more.
Then the W3C published XHTML 1.1.
It seemed as if the W3C were losing touch with the day-to-day reality of publishing on the web as they were moving towards XML.
They began working on XHTML 2
XHTML 2 wasn’t going to be backwards compatible with existing web content or even previous versions of HTML
Representatives from Opera, Apple and Mozilla were unhappy with this direction.
They formed their own group: the Web Hypertext Application Technology Working Group, or WHATWG
They started working on HTML Standard and came out with new revision HTML5
The W3C uses a consensus-based approach: issues are raised, discussed, and voted on.
At the WHATWG, issues are also raised and discussed, but the final decision on what
goes into a specification rests with the editor. The editor is Ian Hickson.
While HTML5 was being developed at the WHATWG, the W3C continued working on XHTML 2
Later on W3C admitted that the attempt to move the web from HTML to XML just wasn’t working.
Rather than start from scratch, they wisely decided that the work of the WHATWG should be used as the basis for any future version of HTML.
Later on W3C announced that they will stop working on XHTML 2 and they will support WHATWG.
There are two groups working on HTML5. The WHATWG is creating an HTML5 specification using its process of “commit then review.” The W3C HTML Working Group is taking that specification and putting it through its process of “review then
commit.”
TechJini Solutions
TechJini Solutions is Bangalore, India based company working in the areas of software product engineering services and creating next generation software products that bring real business value. We take pride in our philosophy of taking on challenging problems and providing innovative and outstanding solutions. We are proud to develop applications on different mobile/tablet platforms including iPhone, iPad, BlackBerry and Android.
Next time, we will look at Forms in HTML 5. Feel free to email me for more details – avidnyat@techjini.com
Steps For Publishing Application On Android Market
- Make your application non debuggable
- Remove the
android:debuggable="true"attribute from the<application>element of the manifest. - Remove log files, backup files, and other unnecessary files from the application project.
- Check for private or proprietary data and remove it as necessary.
- Deactivate any calls to
Log methods in the source code. - Is in your possession
- Represents the personal, corporate, or organizational entity to be identified with the application
- Has a validity period that exceeds the expected lifespan of the application or application suite. A validity period of more than 25 years is recommended.
- If you plan to publish your application(s) on Android Market, note that a validity period ending after 22 October 2033 is a requirement. You can not upload an application if it is signed with a key whose validity expires before that date.
- Is not the debug key generated by the Android SDK tools.
- Steps for creating the private key
- Set the following paths for the environmental varialbles JAVA_HOME: C:\Program Files\Java\jdk1.6.0_20 PATH: C:\Program Files\Java\jdk1.6.0_20\bin
(this value changes depending on where we have stored the jdk)
- Right click on the project and do the following Androidtools>export signed application>next>select create new keystore>next>next>finish.
- Open command prompt and type the following.Set the path to where the keystore is stored C:\Documents and Settings\bindu\Desktop>keytool -list -alias [aliasname] -keystore [keystorename]
- We now have obtained the fingerprint
- Now open the following link and enter the obtained finger print http://code.google.com/android/maps-api-signup.html
- Now we have the private key in your google account.
- Register for a Maps API Key,if your application is using Map View element
- If your application uses one or more Mapview elements, you will need to register your application with the Google Maps service and obtain a Maps API Key, before your MapView(s) will be able to retrieve data from Google Maps. To do so, you supply an MD5 fingerprint of your signer certificate to the Maps service.
Obfuscating the codeWe can use tools like ant and progaurd to obfuscate the code. Detailed steps for this is given in blog. http://android-developers.blogspot.com/
- Licensing the application After we finish all the above steps refer the following link to publish the application in the android market. http://developer.android.com/guide/publishing/licensing.html
Creating a Customized PopOver for MapView
The android developers tutorial guides to create an app that shows a map the user can use to zoom and add overlay items that mark points of interest. Suppose the user wants to display the location of the overlay items that were added,as a callout bubble, a customized layout has to be created and added as a subview of the mapView.
Creating a layout:
Create a new xml file in Layout folder,say popOver.xml.
<FrameLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:id=”@+id/mapBubbleWrap”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” >
<LinearLayout android:orientation=”horizontal” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/bubble_container”>
<FrameLayout android:layout_width=”wrap_content” android:layout_height=”wrap_content”>
<ImageView android:layout_width=”wrap_content” android:layout_height=”wrap_content”
android:id=”@+id/dialogimage” android:src=”@drawable/popup_leftpointer”/>
<ImageView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:paddingLeft=”10dip” android:paddingTop=”7dip”
android:id=”@+id/dialogimage1″/>
</FrameLayout>
<FrameLayout android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:background=”@drawable/popup_middlebg”>
<TextView android:id=”@+id/mapBubble”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:gravity=”center” android:paddingTop=”7dip”/>
</FrameLayout>
<ImageView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/dialogimage2″
android:src=”@drawable/popup_right” />
</LinearLayout>
</FrameLayout>
The above xml code just contains the image of the popover that is to be displayed onTap of the overlay item. I have 3 images joined together to form a single popover image. One can use a single image and add a text displaying the location inside it. However, 2 images and a text is being displayed in popover so 3 images are being used.
Figure(A)
Figure(B)
Figure(C)
I have used the figure(B) to display the text(location), the left pointer points the top of the item marker.
Figure(D)
Figure(D) shows how the popover will look once we add the above view in the mapview.
Adding the customized view in the MapView
Then,in the MapOverLay class that extends ItemizedOverlay,in the overridden OnTap method, inflate the popOver.xml layout.i.e. protected boolean onTap(int index)
First, we have to get the location of the overlay item. This is done by the getProjection method of the MapView class.
Point point = map.getProjection().toPixels(item.getPoint(), null);
- getProjection() gets a projection for converting between screen-pixel coordinates and latitude/longitude coordinates.
- item is the overlay item (Overlay item = (Overlay) getItem(index);)
Now,we know where we have to place the customized view on the screen. But the point we have got will place the popover on the marker. We need to place it on top of the marker. To get the marker image’s height and width ,use getIntrinsicHeight and getIntrincsicWidth.
height=marker.getIntrinsicHeight();
width=marker.getIntrinsicWidth();
The customized view now has to be moved a few pixels above that corresponds to the marker height and displaced a few pixels in the x-direction that is half the marker’s width.
Set the LayoutParams of the layout that is being inflated.
LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT, point.x – width/2, point.y
- height, 0);
layout.setLayoutParams(params);
Now,add the view to the mapView.
mapView.addView(layout);
The x and y parameters being set in the LayoutParams depends on the kind of image being used as the popover. The image that I have used has a pointer that has to be displayed in the middle of the marker and it won’t be set in the middle of the marker if I use the above logic of setting the x and y parameters of the LayoutParams to half the width of the marker and the full height of the marker. If I do so,the left corner of the image will be displayed on the marker as shown. So use it according to the image being used. 
Gartner Report on worldwide sales of Mobile phones in Qtr I of 2010
This is a research of Gartner on worldwide mobile phone sales and rankings given to the manufacturers as well as OS. I thought I need to share this with you.
Worldwide mobile phone sales to end users totalled 314.7 million units in the first quarter of 2010, a 17 per cent increase from the same period in 2009, according to Gartner, Inc. Smarpthone sales to end users reached 54.3 million units, an increase of 48.7 per cent from the first quarter of 2009. Among the most successful vendors were those that controlled an integrated set of operating system (OS), hardware and services.
“In the first quarter of 2010, smartphone sales to end users saw their strongest year-on-year increase since 2006,” said Carolina Milanesi, research vice president at Gartner. “This quarter saw RIM, a pure smartphone player, make its debut in the top five mobile devices manufacturers, and saw Apple increase its market share by 1.2 percentage points. Android’s momentum continued into the first quarter of 2010, particularly in North America, where sales of Android-based phones increased 707 per cent year-on-year.
Growth in the mobile devices market was driven by double-digit growth of smartphone sales in mature markets, helped by wider product availability as well as mass market price tags. “Increasing sales of white-box products in some emerging regions, in particular India, also drove sales of mobile phones upward. We expect sales of white-box products to remain very healthy for the remainder of 2010, especially outside of China,” said Ms Milanesi.
The first quarter also saw some movement outside the top five mobile handset vendor rankings (see Table 1), Hong Kong-based manufacturer G-Five made its debut into the top 10, grabbing 1.4 per cent of market share in the first quarter of 2010. The rise of white-box manufacturers from Asia has also helped the “others” section, as a proportion of overall sales, increase its market share to 19.20 per cent in the first quarter of 2010, up 2.7 percentage points. “This is having a profound effect on the top five mobile handset manufacturers’ combined share that dropped from 73.3 in the first quarter of 2009 to 70.7 per cent in the first quarter of 2010,” said Ms Milanesi.
Table 1
Worldwide Mobile Terminal Sales to End Users in 1Q10 (Thousands of Units)
| Company | 1Q10
Units |
1Q10 Market Share (%) | 1Q09
Units |
1Q09 Market Share (%) |
| Nokia | 110,105.6 | 35.0 | 97,398.2 | 36.2 |
| Samsung | 64,897.1 | 20.6 | 51,385.4 | 19.1 |
| LG | 27,190.1 | 8.6 | 26,546.9 | 9.9 |
| RIM | 10,552.5 | 3.4 | 7,233.5 | 2.7 |
| Sony Ericsson | 9,865.6 | 3.1 | 14,470.3 | 5.4 |
| Motorola | 9,574.5 | 3.0 | 16,587.3 | 6.2 |
| Apple | 8,359.7 | 2.7 | 3,938.8 | 1.5 |
| ZTE | 5,375.4 | 1.7 | 3,369.6 | 1.3 |
| G-Five | 4,345.0 | 1.4 | ||
| Huawei | 3,970.0 | 1.3 | 3,217.9 | 1.2 |
| Others | 60,418.1 | 19.2 | 44,972.2 | 16.5 |
| Total | 314,653.50 | 100.0 | 269,120.10 | 100.0 |
Source: Gartner (May 2010)
In the first quarter of 2010, Nokia’s mobile phone sales to end users reached 110.1 million units, a 1.2 per cent decline in market share year-on-year. Although Nokia’s midtier products sold well, Nokia lacks a high-volume driver in the high-end. “MeeGo based devices and other high-end products will not rejuvenate Nokia’s premium portfolio until the end of the third quarter of 2010 at the earliest, and Nokia will continue to feel pressure on its average selling price (ASP) from vendors such as HTC, RIM and Samsung,” said Ms Milanesi. The reorganisation announced last week demonstrated that Nokia is trying to streamline the reporting process to deliver results quickly, which we believe shows its recognition of the pressure it faces from investors.
Samsung sold 64.9 million devices in the first quarter of 2010, an increase of 26.3 per cent year-on-year. Samsung was one of the five vendors in the top10 vendors ranking to grow its market share, which increased by 1.5 percentage points year-on-year. Samsung saw healthy margins in the first quarter of 2010 and was also able to grow its presence in developing markets such as India and the Commonwealth of Independent States.
RIM’s mobile phone sales reached 10.6 million units in the first quarter of 2010, a 45.9 per cent increase year-on-year. RIM is making its debut into the top five worldwide mobile handset manufacturers ranking. RIM’s focus this quarter was centred on its ecosystem strategy, its tightly integrated control of store, OS and device played to RIM’s strengths.
Sony Ericsson sold enough units to remain in the top five mobile handset manufacturers, but its market share declined 2.3 percentage points in the first quarter of 2010. The channel held some inventory for Sony Ericsson in the first quarter of 2010 as some new products reached the channel late into the quarter. One of Sony Ericsson’s most important future differentiators is its relationship with its parent company, Sony. This partnership, combined with Sony Ericsson’s ownership of the strongest portfolio it has had since 2007, place it well to lead the trend toward increasingly connected consumer devices.
The first quarter of 2010 was Apple’s strongest quarter yet, which placed the company in the No. 7 position with a 112.2 per cent increase in mobile devices sales. “Growth came partly from new communication service providers in established markets, such as the UK, and stronger sales in new markets such as China and South Korea,” said Ms Milanesi. “The second quarter of 2010 will be a very important one for Apple. We expect that Apple will present its new iPhone in June during its Worldwide Developer Conference, which will be the first to feature the latest release of the iPhone OS that includes welcome improvements for developers and users, such as multitasking.”
In the smartphone OS market, Android and Apple were the winners in the first quarter of 2010 (see Table 2). Android moved to the No. 4 position displacing Microsoft Windows Mobile for the first time. Both Android and Apple were the only two OSs vendors among the top five to increase market share year-on-year. Symbian remained in the No. 1 position but continued to lose as Nokia remains weak in the high-end portfolio.
Smartphones accounted for 17.3 per cent of all mobile handset sales in the first quarter of 2010, up from 13.6 per cent in the same period in 2009.
As seen with the iPad and web books based on Google’s Android platform, mobile OS ecosystems are developing and will move beyond smartphones to continue to deliver consumer value and a rich user experience,” said Roberta Cozza, principal research analyst at Gartner.
Table 2
Worldwide Smartphone Sales to End Users by Operating System in 1Q10 (Thousands of Units)
| Company | 1Q10
Units |
1Q10 Market Share (%) | 1Q09
Units |
1Q09 Market Share (%) |
| Symbian | 24,069.8 | 44.3 | 17,825.3 | 48.8 |
| Research In Motion | 10,552.6 | 19.4 | 7,533.6 | 20.6 |
| iPhone OS | 8,359.7 | 15.4 | 3,848.1 | 10.5 |
| Android | 5,214.7 | 9.6 | 575.3 | 1.6 |
| Microsoft Windows Mobile | 3,706.0 | 6.8 | 3,738.7 | 10.2 |
| Linux | 1,993.9 | 3.7 | 2,540.5 | 7.0 |
| Other OSs | 404.8 | 0.7 | 445.9 | 1.2 |
| Total | 54,301.4 | 100.0 | 36,507.4 | 100.0 |
Source: Gartner (May 2010)
Mobile e-mail, rich messaging and social networking will continue to drive demand for smartphones and enhanced phones that feature full qwerty hardware keyboards. “To compete in such a crowded market, manufacturers need to tightly integrate hardware, user interface, and cloud and social networking services if their solutions are to appeal to users,” said Ms Cozza. “Just adding a qwerty keyboard will not make a device fit the communication’s habits of today’s various consumer segments.”
The morale of the research would be to understand the domain of mobile marketing and effectively utilize the advantage to our marketing efforts.
iPad: A New Business Model for Publishing Houses
The iPad marks the emergence of a new business model for Publishing Houses, are you ready to use this opportunity to move into the digital age?
iPad is likely to be a great medium for publishing houses, who have drastically been hit with fast falling revenues (in reference to the year 2009). Newspapers have seen significant decline in print advertising revenues, online versions did not provide many options to monetize. However iPad and mobile apps may have slated to change all these.
Why iPad and Mobile Platforms for Publishing Companies?
 Why choose iPad and Mobile platforms instead of Web, the major problem with digital content on the web are that people expect it to be free. As this is one of the greatest strengths of the web, while free is great for consumers and the World, it does not create any revenue for publishers.
The iPad provides an opportunity to change all that. We’ve already become accustomed to paying for iPhone applications, it seems natural to pay for iPad magazines, books, and news papers provided the experience is significantly better than the dead-tree versions.
Several hundred thousand iPads have been pre-ordered. Analysts expect Apple to sell around 5 million units in 2010. A survey executed by the analysts of comScore indicated that 34 percent of iPad buyers will use it to read newspapers and magazines. 68% of young consumers indicated a willingness to pay for news and magazines specially formatted for e-readers.
The US Audit Bureau of Circulations already revised the definition of digital magazines. Publishers may now report items as E-reader distribution averages, mobile app purchases, etc. in order to reflect the new audience.
The article quoted Chris Anderson of Wired at TED 2010 stating that the iPad “[is] an opportunity to reset the economics,” of digital publishing. “For the first time, people may value this experience so much they’ll pay for it.”
Many Companies adapting to the World of Mobile and iPad World:
Many prominent Publishing houses like McGraw Hill, Houghton Mifflin, Kaplan, USA Today, New York Times, The Wall Street Journal, BBC News, the Associated Press, Time magazine and many more are looking at iPad apps as a very strategic initiative on a subscription mode. USA Today has been downloaded 175,000.
Statistical details on the applications being downloaded on the “Apple iTunes store” –source O’Reilly Research
We could see from the figure one that 30% of downloads are from the books and rest applications comprise to 70%, as many publishing companies have started publishing multiple titles on the emergence of the iPad.
In reference to the fig 2: Application Downloads
Obviously, a game developer won’t be able to churn out new applications at the same rate as an eBook publisher. Game developers have, on average, 2.3 apps in the store (looking at data from the last week), while a typical eBook vendor is selling almost 18 apps right now.
Books are also currently the fastest growing category in the App Store (285% in the last three months), mostly because vendors can simply pack different texts into separate applications. Compared to other categories, productivity apps are only growing slowly, though the number of apps in this category still grew 58% over the last 12 weeks.
Statistics on the Downloads
| Books Applications | Approximately 35,000 |
| New Applications | Approximately 40 new books daily |
Different kinds of eBook application on iPad and iPhone
| iPad | around 30,000 applications |
| iPhone | around 5,000 applications |
Average prices in Top-100 under the category “Books”:
| Within all top-100 app | $ 2.61 |
| Top 1 to 10 app | $ 1.89 |
| Top 51 to 100 app | $ 2.69 |
Distribution of prices in Top-100 under the category “Books”:
| Minimum Price | $ 0.99 |
| Maximum Price | $ 14.99 |
Portfolio characteristics of the most successful publishers from Top-100 “Books”:
Fig 3: Content uniqueness:
Fig 4: By content
- Portfolio of the average successful publisher from Top-100(“Books”) has approximately 60 applications.
- Moreover, there’s one publisher holding 25% of all content of the section “Books”.
Effective models for selling the books:
- Free Application with free books and In App purchase of books
- Portfolio of books with SEO of high quality both in iTunes and through search engines (Google etc)
Conclusion:
- Publishing companies should work on releasing interactive books which started promptly developing last month, especially in light of iPad release (even though the cost for producing such books is much higher as compared with normal books);
- The segment of medical books has some perspectives (most probably it is also related to iPad release, which allows to operate easier with the graphics etc) and making the students or the readers to have a very good usability.
- Interactive books for children and comics, which is one of the most stable and quick-growing segments.
Why Techjini?
- More than 25 iPhone applications in the Apple-app store.
- Global Consulting Company: We apply innovation into every aspect of application development, be it Project management or Lifecycle Management.
- Individual and personalized focus on each client of ours.
- Competitive pricing for iPad application development services
- Professional support and maintenance for iPad projects.
For more details or a free quote kindly contact shiv@techjini.com
Smart Phone Apps for Hotel industry
Hotel industry is moving ahead aggressively in terms of marketing by using the power of mobile and smart phones.They are utilizing mobile Apps to provide the convenience factor for their loyal customers to stay ahead in the competition.
Many prominent Hotel Groups like Hilton, IHG, Choice Hotels, Best Western, The Peninsula, Four Seasons and many more are looking at mobile apps as a very strategic initiative to increase customer loyalty. Hilton’s app was downloaded 126, 000 times till date.
Why buzz in mobile Space?
- 75 million Blackberry users in the world
- 50 million iPhone users in the world till date and 450,000 iPads sold in 1st week and growing.
- 172 million Smartphones users in the world with 4% on Android
Smartphones market growing 25% YoY basis
How do we help you to Benefit?
We could develop a customized iPhone or any smart phone app that will initially give your smart phone toting customers basic tools for booking and managing reservations. Expect to find:
- Search and book hotels
- GPS functionality to find nearby hotels
- ability to see hotel photos and facilities
- custom directions using the iPhone’s GPS
- click-to-call front desk for each hotel
- automatic use of any membership Club account information to speed bookings
- redeem loyalty points for stays
- view point balances, level, etc…
- view and cancel upcoming reservations
- enroll in the program, if you’re not a member
- customize billing preferences and room/rate preferences
- Customer could customize his requirements even before arrival into the hotel.
- see special offers for loyalty members
Why iPhone App for Hotels?
There has been a huge buzz about using latest technologies for marketing. It was facebook, twitter and now the latest is iPhone. iPhone is very handy compared to other technologies and it provides the following benefits with a a very personalized and targeted approach to your customers
- Brand Elevation
- Improves Customer loyalty
- Easy way to promote your promotional offers faster
- On the go mobility to reserve
- Improves Customer Satisfaction
- Improves Revenue at low TCO
- Real time data for Customers about the latest happenings
Cnet reports that the number of users who will tap into the App store will be at 100 million by 2013. Just imagine the momentum and let’s grab the opportunity with a well build good looking app that helps in your Brand Elevation.
ROI on Smart Phone Apps for Hotels
The main driver behind the increased usage of mobile apps by Hotel customers is ” Convenience”. It is said that many of the customers are booking rooms on the fly. Given below are some stats that could help you i evaluating the ROI quotient for Smart Phone Apps.
- Mariott Hotels mobile initiative has generated nearly $ 2 million in gross revenuebetween its Aug, 2008 launch and end of the year. Courtesy Ad Age.com
- Omni Hotels mobile site traffic has grown by 85 % in the past six months and mobile is seeing a conversion rate of 25% said Kerry Kennedy, the hotel’s e-Commerce Director.That means one in every four people who visit the chain’s app end up booking a room.
- Mr. La Rose of Hilton told that wireless bookings have generated roughly $ 1.4 million dollars in an average 100 day period.
- Many Hotels have improved ROI of more than 25% per year.
- Mobile bookings have improved to nearly 85% without any promotions of mobile apps.
By looking at the above stats , we could at least safely consider that it is going to wow the customers and when we get the ROI in 2-3 years it is going to wow the management. As a customer focused industry, we need to bring that convenience and comfort to customers which in turn improves Sales.
Why TechJini ?
- Global Consulting Company
- Innovation in every aspect of Application Development Life cycle
- More than 25 iPhone Apps in the Apple App Store
- Focused and personalized approach towards each Client
- Experience in working with Mobile OEM’s and Fortune 500 companies
- Quality Process – Zero defect delivery
- Flexible Engagement Models
- 100% Delighted Customers
- More than 60% of annual revenues from repeated business
- More than 100% growth YoY
How to set up Mysql Master-Slave Replication
Replication consists of following 3 parts….
- The master records changes to its data in its binary log (Binary Log Events).
- The slave copies the master’s binary log events to its relay log.
- The slave replays the events in the relay log, applying the changes to its own
data using Slave Thread.
The basic steps to set up replication are…
- Set up replication accounts on master server.
- Configure the master and slave.
- Instruct the slave to connect to and replicate from the master.
Here are few assumptions….
Master IP Address: 192.168.1.215
Slave IP Address: Â 192.168.1.203
Replication User: replication
User Password: slave
The I/O Slave Thread (it runs on Slave Server) makes a TCP/IP connection to the master. Thats why we need to create an user account on Master Server with proper privileges.
Now run the following query on Master to create a Slave account….
mysql>Â GRANT REPLICATION SLAVE ON *.* TO ‘replication‘@’192.168.1.203′ IDENTIFIED BY ’slave’;
Now edit my.cnf file on Master accordingly.
[mysqld]
server-id                      = 1
log-bin                         = mysql-bin
log-bin-index               = mysql-log-bin.index
relay-log                      = mysql-relay-bin
relay-log-index            = mysql-relay-bin.index
expire_logs_days        = 10
max_binlog_size         = 100M
binlog_do_db              = [Database Name to be Replicated]
binlog_ignore_db        = [Database Name not to be Replicated]
#binlog_ignore_db      = [Database Name not to be Replicated] (for more than one data base which is not supposed to be replicated)
datadir                         = /var/lib/mysql
tmpdir                          = /tmp
Now restart Master mysql server and run the following query…
mysql>Â SHOW MASTER STATUS;
Now edit my.cnf file on Slave accordingly…..
[mysqld]
server_id               = 2
master_host           = 192.168.1.215
master_user           = replication
master_password  = slave
master_port           = 3306
relay_log               = mysql-relay-bin
relay-log-index      = mysql-relay-bin.index
We can set the value for master_host, master_user and master_password using mysql query. So it is better to avoid setting those values directly from configuration file.
If master is having data already, insert the data from master server to slave server database or each of the databases.
Copy master database back up inside slave server and run the following command on slave….
mysql -u[username] -p[password] [database name] < directory_path/[database.sql]
Now Restart Mysql Slave server and run following query to synchronize master and slave….
mysql> CHANGE MASTER TO MASTER_HOST=’192.168.1.215′, MASTER_USER=’replication’, MASTER_PASSWORD=’slave’, MASTER_LOG_FILE=’mysql-bin.000004′, MASTER_LOG_POS=570;
Note: MASTER_LOG_FILE and MASTER_LOG_POS values have been taken from the result of SHOW MASTER STATUS
If a Slave is already running on your Slave Server, Mysql Server will throw a error like…
ERROR 1198 (HY000): This operation cannot be performed with a running slave; run STOP SLAVE first
So run..
mysql> STOP SLAVE;
And run the query for CHANGING MASTER again.
If it shows an error like..
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
Run…
mysql> RESET SLAVE;
And run the query for CHANGING MASTER again.
Finally start slave on slave server using..
mysql> START SLAVE;
mysql> SHOW SLAVE STATUS\G
Congrats! Mysql Master-Slave Replication has been set up
Also we will be able to see the Replication Threads in the process list on both the Master and the Slave.
So simply run…
mysql> SHOW PROCESSLIST.
Thunderbird 3 beta 4 – Search and Conversations (Gloda)
I have been using Thunderbird 3 (various beta) for quite some time now. There were quite a few new features but the ones I really liked or have been most useful were ‘tabs’ and new ‘Lightning’ add-ons.
I mostly use tabs to remind me of important emails. One, they are always in front and second when I restart Thunderbird I don’t have to look for them again as Thunderbird remembers/maintains last open tabs. Ofcourse tabs are also very helpful in keeping all open windows clean.
New Lightning addon works well with google calendar. Very helpful when sharing different calendars with different people. It synchs well and also gives reminders.
But thats not what excited me enough to write this article
I upgrade to b4 pre today and they have included Gloda search engine based search and conversations. Earlier it was available as an add on and I tried this earlier with b2 but it didn’t work.
Thunderbird 2 has per folder indexing which is not so helpful. You will have several folders and then your replies going into sent items. So what is needed is a tool to search across all folders. Also several times you need to read full conversations which is very very difficult right now. Thunderbird 3 has this powerful search engine ‘Gloda’ which search across all the folders and presents them either as a list or as conversations. WOW!! could it get better?
Now you can search your entire mailbox, rss feeds etc from single place and that too with lot of intelligent options. The result is also displayed very nicely. You have several filters to further refine search/conversations.













