c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel

Latest Updates: School RSS

  • Zach Blank 1:33 am on November 21, 2007 | 1 Permalink | Reply
    Tags: MySQL, School, , ,

    so as far as I can tell I am the first person at the University of Oregon to successfully install, setup, and run mysql and wordpress on their UOregon account. So that being said this post is intended to outline step by step the process so most people can do it themselves. Please leave comments on this post to let me know if it was helpful, useful, or didn’t work for you.

    So Here we go…

    Step 1 - Installing mysql:
    In a unix command prompt ssh into your account. Go to the Computing Center’s website if you need more instructions on this.

    OK now your in. If you do not have a public_html directory create one now. This is where everything that the public will see will be (basically your whole web page).

    mkdir public_html

    OK, no we need to manually create a .my.cnf file, this is the business file for configuring mysql. So above public_html type pico .my.cnf. now you will see a text editor. In this file you will add the following:

    [mysqld]datadir=/home#/account_name/mysql/
    
    socket=/home#/account_name/mysql/mysql.sock
    
    port=xxxx
    
    user=account_name[mysql]
    
    socket=/home#/account_name/mysql/mysql.sock
    
    port=xxxx
    
    user=account_name
    
    [mysql.server]
    
    user=xxxx
    
    basedir=/home#/account_name/mysql/
    
    [client]
    
    host=127.0.0.1
    
    socket=/home#/account_name/mysql/mysql.sock
    
    port=xxxx
    
    user=account_name
    
    [safe_mysqld]
    
    pid-file=/home#/account_name/mysql/mysql.pid
    
    err-log=/home#/account_name/mysql/safe.log

    Where you see home# enter your home. If you do not know what this is type pwd in your command prompt and it will tell you, for example I am home11, you might be home8 and so on.

    Where you see account_name enter your account name. For example jsmith (it is your uoregon account name).

    And where you see XXXX enter your port. This is a number of your choice above 5000. For example 5348 or 5729. Just choose anything in the 5000’s.

    Your done with this file. Hit control + X to save it and lets move on.

    Now it’s time to install mysql.
    type

    mysql_install_db

    (make sure that you are still above public_html)

    Now start mysql by typing

    mysqld_safe &

    OK we are doing great so far.
    Now we are going to set the credentials for the mysql so other people cannot connect to the database. So type

    /usr/bin/mysqladmin -u root -h shell --port=xxxx password 'new-password'

    Where you see xxxx put your port that you specified before and where you see new-password enter the password you want to use to protect it.

    Thats it. Now to access your database type:

    mysql -u root -h shell --port=xxxx -p

    Replacing xxxx with the port you specified before. You will then be prompted for your password. Enter it (you will not see anything appear on screen as you type, that is how it works, just type your password and hit enter.

    If all you wanted is mysql, then your done, if you are installing Wordpress then keep reading.

    Step 2 - Creating database for wordpress:
    First type

    create database database_name;

    replace database_name with a name of your choice. I prefer wordpress for this.
    Next type

    GRANT ALL PRIVILEGES ON database_name.* TO "root"@"128.223.142.%" IDENTIFIED BY "password";

    replace database_name with the name you specified above and replace password with a password of your choice.

    type

    FLUSH PRIVILEGES;

    And lastly type

    EXIT;

    Step 3 - configure, setup and install Wordpress
    Go to wordpress.org and download wordpress. Using SFTP upload the whole directory to your public_html directory.

    Once that is done using pico just like before edit wp-config-sample.php. (These instructions are in the redeme file that came with wordpress.
    this file should now have this in it:

    // ** MySQL settings ** //define('DB_NAME', 'wordpress');     // The name of the database
    
    define('DB_USER', 'username');     // Your MySQL username
    
    define('DB_PASSWORD', 'password'); // ...and password
    
    define('DB_HOST', '128.223.142.32:xxxx');     // 99% chance you won't need to change this value

    replace xxxx with the port you specified in the mysql setup.
    Thats it!

    Now we need to install Wordpress. Go to the wp-admin directory and type

     chmod 755 install.php

    then

    pico install.php

    add to the first line of this file

    #!/usr/local/bin/php

    Now you can go to your browser and point it at http://www.uoregon.edu/~your_user_name/wordpress/wp-admin/install.php and follow the instructions.

    LAST STEP
    This part is the biggest pain. Every time you try and go to a wordpress page and you get “500 internal server error” you need to see what file it is by looking at the browser location bar and then to that file you need to add:

    #!/usr/local/bin/php

    to the first line and change the permissions to 755 (chmod 755 file_name)

    you might be tempted to just go and do this to every file but if you do then you will break it. When one file is included in another the first does not need it, and if it as it then it will be displayed by the browser, and break your page.

    Good luck! I hope this helps. I will make edits as my comment suggest. Happy Blogging!

     
  • Zach Blank 6:31 pm on November 18, 2007 | 0 Permalink | Reply
    Tags: , , Life, , , , School

    So months ago I posted that version 1.0 of this site was out and ready to go. Well that was nothing more than a flat lie. I haven’t done anything on the site but kick myself for not working on it for the last nearly 5 months.

    After really getting into school this term and taking classes where the Instructors really push ‘the real world’ I found the motivation to do my own work. The last five months I have been swamped working on projects like OSI Rock Stars, Defiant Gardens, Oasis Connect and DARTS Connect. Some of these projects have been more enjoyable than others and some are still going but overall having a full time freelance job on top of going to school full time ‘aint easy. It better pay off!

    Poke around the site, new things are going to be going up all the time. I have an arsenal of apps that I have been developing - AJAX and PHP, Wordpress plugins, some Google API stuff and a bit of Facebook of course. I think they are all pretty cool but you can let me know as I start releasing them. They will all be OpenSource and each hosted on their own, so hopefully you will find them useful.

    Check back - or don’t, I’ll be here either way.