Archive for the 'Web Development' Category



10 Smart Javascript Techniques to Improve Your UI

Wednesday 17 September 2008 @ 5:47 pm

Javascript can add a lot of special effects that can really improve the user’s experience. Here are 10 simple and clever Javascript techniques that add an extra dose of usability to any webpage.

Javascript is typically used as an aesthetic language in web development. This means that web developers should almost always be using Javascript for one thing only: Improving the visitor’s experience. There are many clever and useful ways to improve a site from the user interface perspective. A developer can find nearly any snippet of Javascript to achieve what he or she wants to accomplish.

Preview image by miusam-ck.

Javascript is truly a powerful and easy language to learn. It can be used to perform simple, aesthetic functions like toggling an element. It can be used to power a dynamic email client, and even send data instantaneously. Javascript can be as simple or advanced as you want it to be.

Javascript Frameworks

A great place to find Javascript techniques that can improve your site’s functionality is by browsing Javascript frameworks and their plugins and documentation. Here are a few frameworks that have lots of resources, plugins, and communities behind them:

Frameworks are a blessing to any developer or designer who wants to quickly add Javascript effects to their layouts, without having to make raw code. Many of the techniques that we use below will run on Javascript frameworks like JQuery or MooTools.

Simple Javascript Techniques that Make Happy Users

It’s important to note that many of these features aren’t big and obnoxious, but rather small and subtle. Too often developers get carried away when it comes to adding Javascript. These are small but very useful techniques that can be used by almost any developer. You’ll also note that most of these features deal with cleverly hiding and showing important information in non-traditional ways.

1. jQuery Hover Sub Tag Cloud

The jQuery hover sub tag cloud is an excellent example of a simple piece of Javascript that really adds a nice, subtle touch to tag clouds. As the user hovers over a specific tag and it has sub-tags associated with it, a pop-up box appears and shows the sub-tags. Simple, yet effective.

2. Opacity Change

Opacity Change is a little tutorial on how to use Scriptaculous to make an opacity change for an element.

Opacity changes are great for many different reasons: showing hovered content, showing content that has been clicked on, and many other useful functions.

3. Image Upload and Auto Crop

Being able to crop photos after you upload them is a feature that more web applications could use. That’s why the jQuery image upload and crop is such an under-used Javascript technique. Cropping images is a much-needed function when it comes to uploading images, and many web applications could benefit from adding this useful feature.

Honestly, I think that nearly all image uploads could use a basic crop function. However, image cropping isn’t the easiest Javascript function to add to a form. It’s a somewhat involved process, using image libraries and Javascript. Using this script built on the jQuery framework can add a lot to the user’s experience without a bunch of extra code.

4. Password Strength Meter

As hackers become smarter and larger in numbers, it’s becoming more and more important for site users to pick strong, non-guessable passwords that contain a combination of letters (upper and lower case), numbers and special characters. However, this task is easier said than done. Users typically don’t read directions if they can help it.

Visually showing password strength in registration forms is an excellent way to encourage users to make the passwords more challenging. While this is slowly becoming more common this simple technique is not used anywhere near as much as it should be.

The Password Strength Meter works off of prototype/scriptaculous and is a handy little script that shows the strength of the password with a colored meter in real-time. More sites need to implement this type of “safety” script to help users see the dangers of inputting weak passwords.

5. Magic Zoom

Magic Zoom is a highly-useful script for eCommerce sites, as well as other sites that have detailed images. Instead of having the user making an extra click to a much larger picture and use up bandwidth, Magic Zoom allows you to essentially look through a magnifying glass at each picture.

Magic Zoom is a paid script, but well worth the $47 if you have an eCommerce store or any other site that has very detailed photographs. You can download the trial version below.

6. JQuery Autotab

Every single form on the Internet should have this feature. It might just be the perfectionist in me, but having multiple input forms that autotab to the next input automatically seems like it should be commonplace. It’s such a relief when filling out items like social security numbers when the input automatically tabs to the next input.

The jQuery Autotab script is self-explanatory, and does what the name implies: adds autotabs to forms with jQuery.

Sometimes it’s the small things in development that can really make a difference.

7. Incredible Javascript Login Form

While we typically don’t like to toot our own horn at NETTUTS, how can we talk about clever and useful Javascripts without bringing up Connor Zwick’s awesome tutorial on how to build a useful login form?

The Javascript login form is an elegant combination of jQuery and a beautiful Photoshop layout to achieve the effect of being able to show a login form without having the box take up a bulk of the page. Digg is another great example of a site using Javascript to show and hide the login form.

8. Context Highlighting Web Forms

Forms are some of the hardest parts of web design. Make a form too long and you might scare away a potential user or customer. If a form’s design is unattractive, that might scare away a potential user as well. Any way that we can make our web forms more appealing to the eye will yield a higher sign-up conversion rate.

The context highlighting web forms script is an excellent attribute to add to a signup form. It’s surprising that more forms don’t offer this functionality. Being able to quickly see the progress on a form can noticeably improve the user experience.

9. Sliding Top Panel

The Sliding Top Panel script is a lot like the Incredible Javascript Login Form. Hiding/Showing important information is a key to beautiful, usable designs. Any time we can use Javascript to help keep unneeded information neatly packed away, we should be striving to do that.

10. Social History

Site promotion buttons and links can quickly clutter a site or blog’s layout. It seems that if you want to promote your blog posts and other content on sites like Digg and Delicious, you have to add a long list of buttons to your template so that you don’t exclude anyone’s favorite social bookmarking or news site.

Social History comes in handy because it runs a test to see where the user has been recently, and loads images to those sites, and only those sites. Essentially, it’s only showing the visitor the buttons that they would want to see.

How does SocialHistory.js know? By using a cute information leak introduced by CSS. The browser colors visited links differently than non-visited links. All you have to do is load up a whole bunch of URLs for the most popular social bookmarking sites in an iframe and see which of those links are purple and which are blue.

  • Subscribe to the NETTUTS RSS Feed for more daily web development tutorials and articles.

by Glen Stansberry

Glen Stansberry is a web developer and blogger who’s struggled more times than he’d wish to admit with CSS. You can read more tips on web development at his blog Web Jackalope.

by Glen Stansberry

Source: http://nettuts.com/javascript-ajax/10-rare-but-clever-javascript-techniques/

Share



Top 12 CSS Frameworks and How to Understand Them

Saturday 30 August 2008 @ 8:11 am

Most designers would have heard of the term ‘CSS Frameworks’, for those who don’t know or aren’t sure, here is a brief description from: Wikipedia:

A CSS framework is a library that is meant to allow for easier, more standards-compliant styling of a webpage using the Cascading Style Sheets language. Just like programming and scripting language libraries, CSS frameworks package a number of ready-made options for designing and outlaying a webpage. .


Sounds great doesn’t it, something that is going to make designing and developing a website that little bit easier. It will take away the repeating of the same old boring stuff and if you write your framework correctly you will be guaranteed your code will meet W3C recommendations. That will leave you plenty of time to design your site, the fun side of the job!

There are a number of Frameworks you can freely download and use, you will need a fair bit of CSS knowledge, some patience and a fair bit of time to get yourself familiar with the layout. The page layout structure is pretty standard across almost all Frameworks, it could be: Header; Main Content; Sub Content; Local Nav; Main Nav; Footer. They also have simple layout structures: Vertical Nav; Horizontal Nav; One Column; Two Column… The variations on structure goes on and on… Any structure you want, basically.

What I am trying to say is that if you are a serious designer/developer you need to use a good Framework, something that in the long term is going to save you a lot frustrations and time. Maybe you will or already have written your own Framework. I have my own, well two actually. One purely for WordPress and one for everything else. Not much difference in the two, but I do like to follow a particular method when designing for WordPress, just my preference.

There is a lot more to CSS Frameworks than I have written here, but I am not going to bore you, download them and try them out. If you don’t like it don’t use, its not for everyone. As with everything else in the world there are a few critics of CSS Frameworks, the pros do outnumber the cons, its all about opinion.

As for me I love them, and I am very grateful to the writers of the following ten CSS Frameworks:

12 of the best CSS Frameworks

1.Elements CSS Frameworks (Source: Project Designs)

2.WYMstyle: a CSS framework (Source: Daniel Reszka)

3.YAML CSS Framework (Source: High Resolution)

4.YUI Grids CSS (Source: Yahoo)

5.Boilerplate CSS Framework

6.Blueprint CSS

7.Schema Web Design Framework
(Source: David Golding Design)

8.CleverCSS

9.Tripoli Beta CSS Framework
(Source: Monc)

10.ESWAT Web Project Framework
(Source: Philip Karpiak)

11.CwS CSS Framework
(Source: Content with Style)

12.My (not really mine) CSS Framework
(Source: That Standards Guy)

Credit : http://speckyboy.com/2008/03/28/top-12-css-frameworks-and-how-to-understand-them/

Share



120+ Free Ajax Activity Indicator Gif Icons – ฟรี

Tuesday 19 August 2008 @ 5:32 pm

Ajax (Asynchronous JavaScript and XML), is a group of inter-related web development techniques used for creating interactive web applications. A primary characteristic is the increased responsiveness and interactivity of web pages achieved by exchanging small amounts of data with the server “behind the scenes” so that entire web pages do not have to be reloaded each time there is a need to fetch data from the server. This is intended to increase the web page’s interactivity, speed, functionality and usability.

Ajax is a cross-platform technique usable on many different operating systems, computer architectures, and web browsers as it is based on open standards such as JavaScript and the DOM. There are free and open source implementations of suitable frameworks and libraries.

The Ajax activity indicators are often used by web developers to let the users know when the Ajax application is loading.

DOWNLOAD ALL ..

DOWNLOAD ALL ..


Credit : http://www.badeziner.com/2008/05/04/120-free-ajax-activity-indicator-gif-icons/

Share



WEB 2.0 คือ ??

Tuesday 19 August 2008 @ 4:31 pm

A short introduction to web 2.0, with special attention to the importance of the user role.

Creative Web 2.0 Learning
View SlideShare presentation or Upload your own. (tags: web 2.0)

Web 2.0
View SlideShare presentation or Upload your own. (tags: satyajeet singh)
Share



10 อันดับของ Ajax toolkits ที่ใช้กันเยอะที่สุดในปี 2007

Wednesday 23 July 2008 @ 9:31 pm

ผลสำรวจการใช้ Ajax Tools ในปี 2007 จาก http://ajaxian.com/

Share



Open new window ด้วย external.js

Wednesday 23 July 2008 @ 8:59 pm

สำหรับ HTML 4.01 (strict) และ XHTML นั้น คำสั่ง target=”_blank” มันใช้ไม่ได้ ก็ต้องหาทางใช้วิธีอื่นๆ แทนโดยสร้างไฟล์ชื่อ external.js ข้างในมีคำสั่งต่อไปนี้

แล้วบันทึกไฟล์เป็น js

ทีนี้เวลาจะนำไปเรียกใช้งาน จาก extrnal.html

ตัวอย่าง



Test กับ Browser Mozilla Firefox 3 และ i.e 6 แสดงผลถูกต้อง

ที่มา : http://accomthailand.wordpress.com/2008/01/14/%E0%B8%B7new-window-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-externaljs/

Share



10 Second Internet Person, sound familiar?

Friday 11 July 2008 @ 10:27 pm

Some people do not understand the Internet idea of online commerce, but then again some people do not understand themselves either. To fully understand Internet Commerce you really only need to monitor your “clicking habits” for a few days to see where you are going and what if anything you are buying. The modern Internet Consumer is there and gone, in a click of any eye, if you do not grab us with good stuff, SEE YA, we are out of here and the speed of light. However you can also make money on that fact and Google AdSense is just one way. Before you go hog wild on the Internet concept of making money in a virtual world you need to educate yourself a little; one of the books I recommend is:

“The 10 Second Internet Man@ger, Survive, thrive & drive your company in the information age” By Mark Breier.

Mark is one of the key people behind Amazon.com, an early .com that won. Why because of their team and there relentlessness. Armin A. Brott was a co-author and former Marine, Commodities Trader and MBA. He is also insane, just like the modern day Internet Person. It appears that is what it takes, these guys are as crazy as the Blitz Marketing Team at The Car Wash Guys in the deployment of their market dominating campaigns.

The book dives into instant information, use of inter-office e-mail, dealing with high-strung individuals all kicking butt. It talks of balance, fun on the team and winning. He sights the venture capital game, investment banker crowd and all the people it takes to please the crowd. They go into an in-depth evaluation of customer feedback and sales in the e-commerce world. If every .COM CEO would have read this book fewer would be gone today. The book is about a five hour read but worth it.

It goes into everything from the tricks of the trade, strategies to beat the competition to tactics that are necessary to move mountains. Some of these strategies have changed but the concept behind them remains the same.

I recommend the book to everyone, but feel that some companies are even more dedicated to winning than they were at Amazon.com. I thought that some of the hard work complaints were invalid because that is what it takes and that is life. If you cannot cope get out of the fire, strong survive. I got the feeling that some of these guys at Amazon were yuppy pricks and whimps on the fire line; but their way worked for them, so hats off to their team. We work that hard everyday at my company and you probably do to; they did it using other peoples money, big deal. But no matter what you think they did do it indeed. If it is really that tough on them then do not take the money in the first place. They asked for it and they got it. At least they were willing to pull though on their commitments to the shareholders and drive hard at the market.

All in all this book was good and had some great advice for managing e-mail, electronic communication, when not to have a meeting, when to get a life, when to ask for more, when and how far to push the troops, what to say to the media, investors, VC, and investment bankers. How investment bankers use your information on other projects and why it is important to make deals fast and why loose lips sink ships. I could not agree more with 80% of this book. The other 20% was information only important to a .COM or to Amazon itself. Some of the stories to illustrate points in this book were great and pointed to the real life inside of this fast passed company. Next on the reading list is Amazon.com, the story of the bookseller itself.

I recommend this book to anyone sitting on their butt and wondering what it takes to survive and to win in the age of the Internet. It is fun to win but the stakes are high and only a few can actually do it. So buy it, read it and think on it, thanks, click out to your right on one of the side bar items. SEE YA

Share



Save $100 in 5 Minutes Backing Up Your Web Site?

Thursday 24 April 2008 @ 9:28 pm

Here’s an easy way to backup your web site’s files and
database (worth thousands of dollars, no doubt) that costs
$0 to learn and perform. It only takes seven easy steps.

You don’t need to know a lot about how to use Unix or how to
use databases like mySQL. The only real tool you need is a
telnet client. Also, you need to know a few commands which
I’ll show you now. (You could even write the commands I’m
about to give you on a cheatsheet.)


STEP 1: CONNECT & GET IN THE RIGHT FOLDER

The web host you’re trying to back up needs to allow shell
access (most do these days).

If you have a Windows computer, download a program called
“PuTTY” which you can use to login in your web host’s shell.
Search for “putty ssh” on Google or get it here:
http:/ he.earth.li/~sgtatham/putty/latest/x86/putty.exe

Open up PuTTY and at the top type in your hostname (your web
site address without the http or www, just “yourname.com”).
Your web host either uses SSH or telnet, first try logging
in using SSH and if it won’t connect try it using Telnet.
Click the “Open” button at the bottom to connect.

When it connects you will be asked for your account’s
username, and after you enter that, it will ask for your
password. If these both take, you’ll see a command prompt
of sorts. What you have to do is browse to the document
root, depending on your host it’s usually a folder like
“public_html” or “wwwroot”.

If the wwwroot or public_html folder has more folders inside
of it, in the form of yourdomain.com, don’t browse into them
yet, just stay in the folder you’re in.

Browsing in the Unix command prompt is just like DOS, to
view a folder type “dir” or “ls”, and to go into a certain
folder type “cd foldername”. If you messed up you can type
“cd ..” to move up one level.

STEP 2: BACK-UP THE DATABASE

The first step if you’re backing up a site is to dump your
mySQL database. To do this obviously you need the mySQL
username and password you want to back up. If your mySQL
username is “myuser” and the mySQL password is “mypassword”,
you’d type:

mysqldump -umyuser -pmypassword -A > dump.sql

mysqldump is the program we run to dump the database into a
file, then we type “-u” followed by the username (no spaces)
and “-p” followed by the password (also no spaces). The
uppercase “-A” tells the program we want to dump every
database this user has access to. It MUST be an uppercase
A.

The “>” afterwards says we want to put this program’s output
into a file (otherwise it would show up on the screen) and
“dump.sql” is the name of the file we’re going to dump to.

This may take a while depending on the size of your
database. Be patient. Once you have a command prompt
again, it’s done.

If you don’t have root on your server, it may show databases you don’t have access to. What you’ll have to do here is “force” mysqldump to keep doing the backups even if it gets error messages. The flag for “force” is “-f”.

mysqldump -umyuser -pmypassword -Af > dump.sql

STEP 3: BACK-UP YOUR FILES

Now you can put everything into one big file, which you can
easily move over to the new host in one go, instead of one
at a time. Unix doesn’t let you create Zip files, but you
can create a TAR (Tape Archive) which just rolls a bunch of
files together without any sort of compression.

To create your TAR archive, type:

tar -cvf dump.tar *

The “-c” tells the program to create a new TAR archive, the
“v” following right after says to be verbose, in other
words, give us the name of every file that’s being added to
the archive. “f: means we’re saving this to a file, as
opposed to showing it on the screen (you’d just see junk).

“dump.tar” is the name of the file we want to save into, and
the “*” means we want to put everything into this TAR
archive — files, folders, everything.

You may get some sort of warning about not adding dump.tar
to the archive, that’s no big deal because we don’t want
this file to add itself.

Your files are backed up. At this point it’s time to move
things over to the next host. There’s a way we can do this
without you having to download the whole thing, and
re-upload it.

STEP 4: ARRANGE YOUR FILE FOR PICKUP

Remember how I said when you were in “wwwroot” or
“public_html” not to browse into the folder containing a
domain name? Well now it’s time to move that dump over into
one of them so it can be picked up.

If one of your folders is, say, yourdomain.com, type:

mv dump.tar yourdomain.com

This moves “dump.tar” into the folder “yourdomain.com”.

STEP 5: MOVE THE NEW FILE OVER

Login to your new host. Browse to its “wwwroot” or
“public_html” folder.

Most hosts include a program called “wget” which works sort
of like a browser in that you give it a URL to pick-up that
it loads. Only this browser also saves the file you want to
load.

If your old host was at yourdomain.com, you’d just type:

wget http://www.yourdomain.com/dump.tar

This will load that URL and save it as “dump.tar”. You’ll
probably see some sort of progress indicator as it goes.

STEP 6: DECOMPRESSING THE FILE

Once you have the file, you use that same TAR program to
decompress it. Type:

tar -xvf test.tar

The “v” and “f” are still there, but instead of “c” (create)
we use “x” (extract). This will unpack each file and let us
know which one it’s working on.

STEP 7: RESTORING THE MYSQL DATABASE

Before you can put the mySQL dump back into the database,
you have to go into this new web host’s control panel and
create blank databases with the same names as you had
before.

You also have to create a mySQL user and make sure that user
has access to all those databases you’ve created.

Once that’s done find the dump.sql that was unpacked with
all of the other files.

Instead of using the program “mysqldump” to dump the files,
we use the program “mysql” which let’s us put commands into
the database. That’s basically what a dump is, a file full
of commands that, when run, will recreate the old database
exactly.

This time we don’t type in the database name right away. To
get into mySQL from the command prompt, type:

mysql -umyuser -pmypassword

Where “myuser” and “mypassword” are your mySQL username and
password. Once you’re in you’ll get kind of a weird looking
prompt. All you have to do at this point is type:

source dump.sql

This says, open up the file dump.sql, read through it and do
whatever it says to do in that file. You will see a bunch
of lines telling you a command has been entered (0 Rows
Affected, 1 Rows Affected, something like that).

If everything goes smoothly, type “quit” and you will be
back in the shell.

You’ve just moved one site (or a bunch of sites) over from
one host to another in about 5 minutes.


About the Author

Article by Robert Plank

Want to pick up more useful PHP and programming skills,
even if you aren’t “the programming type”?
Subscribe here — http://jumpx.com/newsletter

Share



Save $100 in 5 Minutes Backing Up Your Web Site?

Thursday 24 April 2008 @ 9:24 pm

Here’s an easy way to backup your web site’s files and
database (worth thousands of dollars, no doubt) that costs
$0 to learn and perform. It only takes seven easy steps.

You don’t need to know a lot about how to use Unix or how to
use databases like mySQL. The only real tool you need is a
telnet client. Also, you need to know a few commands which
I’ll show you now. (You could even write the commands I’m
about to give you on a cheatsheet.)


STEP 1: CONNECT & GET IN THE RIGHT FOLDER

The web host you’re trying to back up needs to allow shell
access (most do these days).

If you have a Windows computer, download a program called
“PuTTY” which you can use to login in your web host’s shell.
Search for “putty ssh” on Google or get it here:
http:/ he.earth.li/~sgtatham/putty/latest/x86/putty.exe

Open up PuTTY and at the top type in your hostname (your web
site address without the http or www, just “yourname.com”).
Your web host either uses SSH or telnet, first try logging
in using SSH and if it won’t connect try it using Telnet.
Click the “Open” button at the bottom to connect.

When it connects you will be asked for your account’s
username, and after you enter that, it will ask for your
password. If these both take, you’ll see a command prompt
of sorts. What you have to do is browse to the document
root, depending on your host it’s usually a folder like
“public_html” or “wwwroot”.

If the wwwroot or public_html folder has more folders inside
of it, in the form of yourdomain.com, don’t browse into them
yet, just stay in the folder you’re in.

Browsing in the Unix command prompt is just like DOS, to
view a folder type “dir” or “ls”, and to go into a certain
folder type “cd foldername”. If you messed up you can type
“cd ..” to move up one level.

STEP 2: BACK-UP THE DATABASE

The first step if you’re backing up a site is to dump your
mySQL database. To do this obviously you need the mySQL
username and password you want to back up. If your mySQL
username is “myuser” and the mySQL password is “mypassword”,
you’d type:

mysqldump -umyuser -pmypassword -A > dump.sql

mysqldump is the program we run to dump the database into a
file, then we type “-u” followed by the username (no spaces)
and “-p” followed by the password (also no spaces). The
uppercase “-A” tells the program we want to dump every
database this user has access to. It MUST be an uppercase
A.

The “>” afterwards says we want to put this program’s output
into a file (otherwise it would show up on the screen) and
“dump.sql” is the name of the file we’re going to dump to.

This may take a while depending on the size of your
database. Be patient. Once you have a command prompt
again, it’s done.

If you don’t have root on your server, it may show databases you don’t have access to. What you’ll have to do here is “force” mysqldump to keep doing the backups even if it gets error messages. The flag for “force” is “-f”.

mysqldump -umyuser -pmypassword -Af > dump.sql

STEP 3: BACK-UP YOUR FILES

Now you can put everything into one big file, which you can
easily move over to the new host in one go, instead of one
at a time. Unix doesn’t let you create Zip files, but you
can create a TAR (Tape Archive) which just rolls a bunch of
files together without any sort of compression.

To create your TAR archive, type:

tar -cvf dump.tar *

The “-c” tells the program to create a new TAR archive, the
“v” following right after says to be verbose, in other
words, give us the name of every file that’s being added to
the archive. “f: means we’re saving this to a file, as
opposed to showing it on the screen (you’d just see junk).

“dump.tar” is the name of the file we want to save into, and
the “*” means we want to put everything into this TAR
archive — files, folders, everything.

You may get some sort of warning about not adding dump.tar
to the archive, that’s no big deal because we don’t want
this file to add itself.

Your files are backed up. At this point it’s time to move
things over to the next host. There’s a way we can do this
without you having to download the whole thing, and
re-upload it.

STEP 4: ARRANGE YOUR FILE FOR PICKUP

Remember how I said when you were in “wwwroot” or
“public_html” not to browse into the folder containing a
domain name? Well now it’s time to move that dump over into
one of them so it can be picked up.

If one of your folders is, say, yourdomain.com, type:

mv dump.tar yourdomain.com

This moves “dump.tar” into the folder “yourdomain.com”.

STEP 5: MOVE THE NEW FILE OVER

Login to your new host. Browse to its “wwwroot” or
“public_html” folder.

Most hosts include a program called “wget” which works sort
of like a browser in that you give it a URL to pick-up that
it loads. Only this browser also saves the file you want to
load.

If your old host was at yourdomain.com, you’d just type:

wget http://www.yourdomain.com/dump.tar

This will load that URL and save it as “dump.tar”. You’ll
probably see some sort of progress indicator as it goes.

STEP 6: DECOMPRESSING THE FILE

Once you have the file, you use that same TAR program to
decompress it. Type:

tar -xvf test.tar

The “v” and “f” are still there, but instead of “c” (create)
we use “x” (extract). This will unpack each file and let us
know which one it’s working on.

STEP 7: RESTORING THE MYSQL DATABASE

Before you can put the mySQL dump back into the database,
you have to go into this new web host’s control panel and
create blank databases with the same names as you had
before.

You also have to create a mySQL user and make sure that user
has access to all those databases you’ve created.

Once that’s done find the dump.sql that was unpacked with
all of the other files.

Instead of using the program “mysqldump” to dump the files,
we use the program “mysql” which let’s us put commands into
the database. That’s basically what a dump is, a file full
of commands that, when run, will recreate the old database
exactly.

This time we don’t type in the database name right away. To
get into mySQL from the command prompt, type:

mysql -umyuser -pmypassword

Where “myuser” and “mypassword” are your mySQL username and
password. Once you’re in you’ll get kind of a weird looking
prompt. All you have to do at this point is type:

source dump.sql

This says, open up the file dump.sql, read through it and do
whatever it says to do in that file. You will see a bunch
of lines telling you a command has been entered (0 Rows
Affected, 1 Rows Affected, something like that).

If everything goes smoothly, type “quit” and you will be
back in the shell.

You’ve just moved one site (or a bunch of sites) over from
one host to another in about 5 minutes.


About the Author

Article by Robert Plank

Want to pick up more useful PHP and programming skills,
even if you aren’t “the programming type”?
Subscribe here — http://jumpx.com/newsletter

Share



Next Posts »»