• phpMyAdmin #2002 Error For Dummies

      0 comments

    I have been recently working on a PHP tutorial from Lynda.com and I ran in to some trouble with it. The class that I am doing is from 2007 and I have had to install some programs, Apache, PHP, MySQL and phpMyAdmin in order to be able to go along with these classes. All of this stuff is a bit new to me to work with considering the sites that I have designed.

    The class walks you through the instillation of each of these programs but they are a bit out dated. The one in particular that I had the most trouble with was phpMyAdmin so I am giving you the steps to handle this the way that I did in order to make this work for you. I did Google these but it was more for experienced programmers and web designers.

    When I installed phpMyAdmin I got a #2002 error that had mentioned that my socket was not set up correctly or something like that. I some how managed to get it to work. These instructions are for the installation of phpMyAdmin version 3.2.2.1 which is the latest and this is being done on a Mac OS 10.5.8:

    1. Download and unzip phpMyAdmin from the site phpMyAdmin.net. Have it download to the desktop.
    2. Once it is unzipped, change the name to phpmyadmin.
    3. Open up the finder and place the folder as follows: your home file=>sites. It needs to be in sites because this is where the local server is.
    4. Open up phpMyAdmin and in the first set of php docs you will see config.sample.inc.php, you will want to open that up in your text editor program, text wrangler, dreamweaver or what ever program you can use to edit php style text. (Do not use Word or any other word processing programs)
    5. Now Save As that file to config.inc.php and make sure you save it in the phpMyAdmin file.
    6. What you are going to be doing here is adding some code in to this file config.inc.php that will give you your login access. If you where to try to go in and open phpMyAdmin on the local host you will more then likely have gotten this #2002 error which is why you are here. I am going to make this as simple as possible to do you bear with me. Here is what you are going to see in the first half or so of the code:<?php
      /* vim: set expandtab sw=4 ts=4 sts=4: */
      /**
      * phpMyAdmin sample configuration, you can use it as base for
      * manual configuration. For easier setup you can use setup/
      *
      * All directives are explained in Documentation.html and on phpMyAdmin
      * wiki <http://wiki.phpmyadmin.net>.
      *
      * @version $Id: config.sample.inc.php 12304 2009-03-24 12:56:58Z nijel $
      * @package phpMyAdmin
      */

      /*
      * This is needed for cookie based authentication to encrypt password in
      * cookie
      */
      $cfg['blowfish_secret'] = ”; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

      /*
      * Servers configuration
      */
      $i = 0;

      /*
      * First server
      */
      $i++;
      /* Authentication type */
      $cfg['Servers'][$i]['auth_type'] = ‘cookie’;
      /* Server parameters */
      $cfg['Servers'][$i]['host'] = ‘localhost’;
      $cfg['Servers'][$i]['connect_type'] = ‘tcp’;
      $cfg['Servers'][$i]['compress'] = false;
      /* Select mysqli if your server has it */
      $cfg['Servers'][$i]['extension'] = ‘mysql’;

    7. From here you are going to be adding in your user name and password $cfg commands so here is what you do: I have highlighted this one section for you: $cfg['Servers'][$i]['auth_type'] = ‘cookie’;
      /* Server parameters */
      $cfg['Servers'][$i]['host'] = ‘localhost’;
      $cfg['Servers'][$i]['connect_type'] = ‘tcp’;
      $cfg['Servers'][$i]['compress'] = false;       -Right between that ugly green type you are going to add the following code, please note that you can change this:
      $cfg['Servers'][$i]['user'] = ‘root’; //unless you know that this is different, then to not change this!!!//
      $cfg['Servers'][$i]['password']  = ‘cbb74bc’; // type between ‘ ‘ and you can change your password//
      $cfg['Servers'][$i]['auth_type'] = ‘config’;
    8. With that done it should look something like the following with the password changed; /* Authentication type */
      $cfg['Servers'][$i]['auth_type'] = ‘cookie’;
      /* Server parameters */
      $cfg['Servers'][$i]['host'] = ‘localhost’;
      $cfg['Servers'][$i]['user'] = ‘root’;
      $cfg['Servers'][$i]['password'] = ’123456′; // make sure you change your password//
      $cfg['Servers'][$i]['auth_type'] = ‘config’;

      $cfg['Servers'][$i]['connect_type'] = ‘tcp’;
      $cfg['Servers'][$i]['compress'] = false;
      /* Select mysqli if your server has it */
      $cfg['Servers'][$i]['extension'] = ‘mysql’;  -The bold section is what you just changed. Make sure you saved this. What is going to happen now is when you load phpMyAdmin, these configurations that you just did will now allow you to access this program via your web browser. It is more then likely that you will need to do 1 more thing here.

    Now that you have done this, it is more then likely that you are going to get the #2002 Error again but this time the logging screen will not be there. Sorry, no screen shot on this one!! Here is what you are going to have to do now:

    1. Go to Applications=>Utilities=>Terminal and open up terminal
    2. You are now going to be configuring your computer to accept phpMyAdmin and this will be very easy and fast.
    3. With the terminal open you should have your username showing with a ~ in front of it like ~username. What you are going to do is either type in or cut and paste in the following command:   sudo mkdir /var/mysql (then hit return) If you type this in please make sure that you pay attention to the spacing. You should have gotten a password prompt which you use your password that you have set up with the Mac.
    4. Next you are going to want to type or paste in the following: sudo ls -s /tmp/mysql.sock /var/mysql/mysql.sock (hit return) What you have basically done here is set up a directory in mysql and then linked in a file “mysql.sock” which from what I understand is the socket which correlates to the error you got when trying to get in to phpMyAdmin on your local host.
    5. Now go to you web browser and refresh the page.

    If this is still not working there are several possibilities for this but I would suggest that you go back and redo my steps. Personally I did this about 5 times to make sure that it worked. There are other things to consider with this so I would suggest that if you went through my directions and it is still not working, let me know, these directions assume that you have done the instillation of the other programs I mentioned earlier.

  • New SEO Tools!!!

      0 comments

    I found a great tool to work with when it come to doing successful SEO work for your clients. Go on to Google and do a search for “Google Analytics“  and sign up for this right away. You will have to add the code before </body> tag in order for this to work but once you do you will have an invaluable tool that you can use to keep track of your or your clients websites.

    Here are the highlights;

    • Keep track of the amount of hit day, week, month and how long on the site.
    • It breaks down traffic source showing specifically where the hits are coming from whether from other links (specifically which links) or organic (search engines).
    • It breaks down whether the hits are coming from the USA, Canada and the other areas of the world.
    • Shows the keywords that are drawing people to the site.
    • A break down of which pages on the site are being looked at other then your home page. This is great because it shows you which sites you might want to make in to landing pages.
    • It also shows the percentage of first visits to the site.

    If you are a real stats geek like I am, this tool is a god send to work with. It really shows what is and is not working with your SEO work as well as planning out adword campaigns that will really give you the hits that you are looking for. Probably the best feature to this is the fact that you export this data is several format making life much easier.

    Added bonus to this is that Google Key words has a great new beta site that allows you to pug in a website address which then gives you a break down of not only your keywords but also the keywords that are similar to your that you are using. I did this with one of my clients sites today and I found that several of my keywords are doing well. One of them had over 5 million hits but there where some that are getting over 100 million hits a month. Of course I add these to my clients keywords meta tag today so we will see.

    A thing to remember whether you are doing this for yourself or for your clients, have this information is great for future business. It is a sold way to show your future clients what your work is doing to improve the number hits. Good luck

  • Learning PHP

      0 comments

    PHP or as the pro’s know it Processor Hypertext Preprocessor or if you look further in to the history, it simple meant, Personal Home Page!! If you want to see a good example of PHP at work, well, look around your screen, this site is powered by PHP which means that it is powered by databases and PHP language is used to relay information on an HTML page from databases.

    PHP.net is your best bet to find out all of the information about PHP, today I am just updating to mention that I am doing a class on Lynda.com that teaches the basics of PHP. More to come later!!

  • SEO Training and My Site

      3 comments
    Linked Up Design

    Linked Up Design

    Well after a very exhausting week, I have managed to redo my site taking what I learned from the video on SEO that I watched on Lynda.com. And what was my reward? Well, I finished the site and loaded it up and then check on whois.sc and got back my score. Now to brag about this would be wrong but I will say that my score was very rewarding for my work.

    One of the key things that I learned early with regards to SEO and building a site is this point: “You can’t design for SEO only, you have to design for the our potential clients, customers or readers, those of you that have blogs.” Personally I feel that is really the only way to go. To be more specific, if you look at my sites code, there is no H1 or H2 headers which anyone that knows about SEO will tell you has to be in. I ran in to some trouble with this when putting together my site because of the fact that design-wise this was not going to look good. My design was to have a site that got peoples attention quickly, while showing off some design tricks. Because putting in headers put a lot of space between the header and the paragraph, it would have not look right so I opted to not use them. This might or might now work.

    Tools I used:

    • First thing that did was homework and that was what took most of the time. I ran through Google’s Adword campaign to check on key words for print and web design as well as SEO. This was pretty easy because each of these words are “the” keywords. These are obviously in the Title, Keywords, Description & Meta Tags section of the site.
    • From there it was working out the copy that I was going to use in the site so I handed this over to my partner who is our copywriter and we hashed out putting in these keywords in the copy but not in a way that was overwhelming in the site. In other words, we did not put things like, “SEO is great, you need SEO in order to improve your SEO score to get people to visit your Web Site!”
    • Using some bold tabs here and there will also help in the long run.
    • One thing that I put in as a keyword is my location, the reason being is that a bit later tonight I will be sending the URL to local directories in Google and Yahoo to help increase my marketing in my own area.
    • From there I will submit my site to Google, Yahoo and Bing.
    • Next it to put the site in to Directories and a few months from now I will see if this fancy score I got really paid off.

    Do understand that just because I got a good score for the site, it does not end from there. The site needs to be built up as it only has about 4 pages and I do not have the delusion that I will be #1 in ranking in a few weeks, I am 35 miles from NYC so I don’t think that is going to happen. What I know will happen is that I will be able to reach people in my area now which is really more important then anything else!!

  • SEO Training

      3 comments

    I have spent the last week watching a bit of an out dated yet very interesting training video on Lynda.com regarding SEO/SEM. The video is broken down in to chapters and then in to sections and was about 9 hrs long. I choose the word out dated very carefully here because the video is from 2006 which in web years is about 10 years old but on the other hand, all the links and people that are mentioned are all still around and valid which make the value of the time spent very high!!

    The fact of the matter is that the video is so educational that I have decided to completely redo my website to conform along with the points that the author Richard John Jenkins had brought up and point out. (This explains why I do not have a link to my site as yet!!)

    I encourage all of you out there that are will to take on the challenge to site and watch 9 hours of video to do so because it is well worth it. Those who have been around for awhile will pick up some new tips and those that are new to working  with SEO/SEM will learn a ton. As an aside, it is a $25 membership for the month but you have full use of all the videos that they have and this is very expansive.

    In the next few weeks as I go through all of the links that were spoken about in the video, I will be adding them to this site.

    (Disclaimer: I have no affiliation with Lynda.com, I am simply promoting this site based on my experience with them and I receive no benefits from then or any of their affiliates.)
SEO Powered by Platinum SEO from Techblissonline