Updates from April, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 4:21 pm on April 22, 2012 Permalink | Reply
    Tags: , ,   

    Categories: Linux ( 101 ), MySQL ( 19 )   

    How to install MySQL on CentOS 

    This is a step-by-step guide of what you need to do in order to install and setup MySQL on a new server.

    We’ll prepare a fresh CentOS 6 system (64 bit) for use as a database server. All you need is access to an SSH client and your server root credentials.

    (More …)

    • Jeff Huckaby 2:27 pm on June 20, 2012 Permalink | Reply

      Another item I always do is update the default my.cnf. By default, a number of features, such as query caching, is not enabled.

      If you look in:

      You will find some example my.cnf files. I typically use my-large.cnf as a starting point for systems with 4GB of RAM or less. Use my-huge.cnf for systems with more than this.

      Once deployed, check out tools like http://mysqltuner.pl and http://hackmysql.com/mysqlreport to better optimize your installation.

      • Jay Versluis 10:41 pm on June 21, 2012 Permalink | Reply

        Thank you so much for sharing Jeff, much appreciated! I’ll go check it out 😉

    • wayne 12:01 pm on September 2, 2012 Permalink | Reply

      hi, i am trying to set up mysql, and i still don’t see how to get to the actual webpage to set up everything. i set everything up right as far as i know. but i still need help getting to the actual program

    • gunawan 7:20 am on October 1, 2012 Permalink | Reply

      I tried but install but after click the yum
      service ….
      is failed
      then I try
      “error 2002 …”

      what I miss here?

    • Tom 4:30 am on December 24, 2012 Permalink | Reply

      It doesn’t work with me.
      With no configuration, i think it’s impossible

      • Jay Versluis 4:12 pm on December 24, 2012 Permalink | Reply

        What’s the error message you’re getting? Is yum installed on your system?

    • booksd 9:46 am on January 11, 2013 Permalink | Reply

      Any suggestions for the following command and response?

      [root@LiunxCentos arasu]# service mysql start
      mysql: unrecognized service
      [root@LiunxCentos arasu]#

      • Jay Versluis 4:06 pm on January 11, 2013 Permalink | Reply

        Sounds like MySQL is not installed, or your system does not recognize the service command. You can also try this:

        /etc/init.d/mysqld restart

        If you get a similar error message, then MySQL is not installed.

      • Jay Versluis 4:08 pm on January 11, 2013 Permalink | Reply

        I just re-read your command – the service is called mysqld, not mysql. Try again using

        service mysqld restart

        • Yeah 9:44 pm on January 11, 2013 Permalink | Reply

          Yeah, you actually wrote ‘service mysql restart’ in the tutorial, I imagine its tripped up a few others, myself included. Only took me 30 secs on google to figure out its ‘service mysqld restart’..Good article anwyays, thanks

          • Jay Versluis 12:41 am on January 12, 2013 Permalink

            How embarrassing!! I’ll change that right away – thanks for letting me know 😉

          • Carl Partridge 10:40 am on May 3, 2013 Permalink

            Actually, don’t change it – on some installations the service is called mysqld, on some the service is called mysql

            If you install from the current packages as per your tutorial, the service is called mysql

    • Mihai Alexandru 6:51 pm on February 23, 2013 Permalink | Reply

      Go on http://softiny.com and choose the LINUX tab and there are software apps to help you do this…

    • Grover 11:38 pm on March 25, 2013 Permalink | Reply

    • Independent Software Developer 4:14 pm on March 26, 2013 Permalink | Reply

      My first time really getting into CentOS and I’m trying to setup basic hosting for my site… I now have a new found respect for system admins because I have gotten so many headaches its not even funny.

      Thanks for this tutorial!

    • madhu 11:31 pm on January 25, 2014 Permalink | Reply

      hai frnds. . . ..
      iam facing problem with secure installation of mysql in centos 6.5
      while secure installation of mysql : /usr/bin/mysql_secure_installation
      am getting error as:Enter current password for root (enter for none):
      ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
      am entered as enter button only,i got the above error

      • Jay Versluis 11:48 pm on January 25, 2014 Permalink | Reply

        Try setting a password via the mysqladmin command as described by the friendly install message. Also, check if MySQL is actually running – you can’t connect if the service is down.

  • Jay Versluis 10:24 am on April 16, 2012 Permalink | Reply

    Categories: Themes ( 28 ), WordPress ( 145 )   

    How to bring back Post Categories in P2 

    We’re all excited about the new features in Automattic’s P2 Theme v1.4.0 – however many of us have setup custom tweaks around Post Categories. In the latest version these have been replaced with Post Formats.

    Post Formats are great, but they are limited to values defined in the WordPress core. If you wanted to create a new post menu like “critical” or “alarm” this wouldn’t work. We could use Custom Post Types to add to those formats, however it’s way too big an operation for I wanted to achieve: which is bringing back the “posting into categories” feature we’ve come to love from the previous version.

    In this article I’ll show you how to back-port categories so posts will appear as they did in P2 v1.3.3 while retaining all functions of the latest update.

    (More …)

    • Ali 3:19 am on May 6, 2013 Permalink | Reply

      <a id="thoughts" class="post-format-button"class="selected" href="" title="">
      <a id="culture" class="post-format-button" class="selected" href="" title="">
      <a id="news" class="post-format-button"class="selected" href="" title="">

    • HG 7:14 pm on July 27, 2013 Permalink | Reply

      Hello, this hack works in P2 version 1.5.1 ?

    • Chris Bell 11:11 pm on September 22, 2013 Permalink | Reply

      What I’d like to be able to do is assign all of the P2 posts into an existing custom post type, e.g. Status Updates.

      I’m integrating P2 with a parent theme, so I’m hacking the theme as best I can.

      • Jay Versluis 9:50 am on September 23, 2013 Permalink | Reply

        Hi Chris,

        the answer lies in a file called post-form.php. This generates the buttons above the post box and sets the post type for each button. Look for an unordered list towards the top of the file and change them to your desired format.

        One thing about P2 child themes: they don’t seem to work properly, I’m not sure why. I’ve noticed that some modifications you make in your child theme don’t make it into the final output.

        • Chris Bell 3:59 pm on September 23, 2013 Permalink | Reply

          Hi Jay,

          My oversight: I accomplished posting to a special post_type by adding a hidden post_type input field.

          Now if only I could get the p2_load_entry to work correctly. 🙂

  • Jay Versluis 6:49 pm on April 10, 2012 Permalink | Reply

    Categories: WordPress ( 145 )   

    P2 Theme gets an upgrade: say hello to Custom Menus and To-Do List Support 

    Today P2 Version 1.4.0 has been released – hurra! Thanks for everyone’s hard work on this amazing theme.

    P2 now boasts a couple of extra options and plenty of changes under the hood, but like many other great features those are not immediately obvious. Let me show you how the new changes work and how they can make your P2 experience even better.

    (More …)

    • ray 11:21 pm on April 26, 2012 Permalink | Reply

      sorry, got it sorted out. Had to do a remove_filter on P2 and then add_filter on the child theme…

      • Jay Versluis 3:58 pm on April 28, 2012 Permalink | Reply

        Excellent, glad to hear it. I know P2 is not a child friendly theme, great idea to re-do that hook, maybe that’ll solve my problem too.

    • David 8:50 pm on May 27, 2012 Permalink | Reply

      great info. thanks…
      btw. i think it’s not custom post type, it’s post format.

      • Jay Versluis 9:53 pm on May 27, 2012 Permalink | Reply

        Thanks David,

        I’ve been meaning to update this a while back – I’ve just done it now. I’m trying to compile a P2 User Guide at http://p2guide.wordpress.com – have a look, it’s work in the early beta stages though. If you have any suggestions please let me know.

    • Tom Wong 3:42 am on July 12, 2012 Permalink | Reply


      I am using P2 version 1.4 and I do not have any capability to do custom menus or to-do lists. Were these features eliminated from version 1.4? Thanks.

      • Jay Versluis 8:46 am on July 12, 2012 Permalink | Reply

        Hi Tom, both those features were introduced in version 1.4 so they should be at your disposal.

        Setting up menus is a two part process which is sometimes overlooked: first you create a menu (under Appearance – Menus). give it a name of your choice, you can have several. Then you have to activate it at the top left by choosing it from the drop down menu.

        To-do lists are a bit hidden: all you do is begin a new line with an x or an o, once you hit save this will be translated into working tick boxes.

        Hope this helps!

        • dave adams 7:40 pm on November 14, 2012 Permalink | Reply

          The todo list is still not working for me. I am using 1.4.2

          I also tried going through the dashboard and creating a new post. Still not working.

          • Jay Versluis 1:44 pm on November 18, 2012 Permalink

            What’s happening for you, is it just showing the o and x at the front of the line, like so?

            Because this in P2 should just convert into tickboxes.

  • Jay Versluis 1:53 pm on April 9, 2012 Permalink | Reply  
    Categories: Linux ( 101 )   

    How to show your Linux Version 

    Sometimes you’re working on a system and you’re not entirely sure which Linux distribution it is. There are several ways to find out what you’re working with and I keep forgetting what they commands are to get there – so here’s a quick list for all of us.

    Release and Distribution

    Most systems (but not all) have a file called something-release in the /etc directory. On CentOS and Redhat this is /etc/redhat-release. Display the contents of that file and you’ll find out:

    cat /etc/redhat-release

    This is not going to work on an Ubuntu system for example where the file is called something different. The best approach hence is to call

    cat /etc/*release

    which will give you the output no matter which distribution you’re on. You may also try

    lsb_release -a

    however this does not work on all systems. When it does it will typically show you a more detailed output.

    Linux Kernel

    If you want to dig even deeper and find out which Kernel you’re using, or if you’re working on a 32/64 bit system, try issuing

    uname -mrs

    which will show you those. Try -a instead for a more detailed output.

    Hubert is running CentOS 5.8 in 64bit. Looks like he needs an upgrade.

    Hope this helps 😉

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc