Publications

Changing Ownership Of A File Using Chown

Fadıl

Recently I encountered a problem when I ftped to my server, I was trying to upload a file that already existed under my username on the server, and I kept getting a 550 error. Which for you newbies out there is a file permission error, telling me that I do not have rights to write over or delete those files under my username.  That made me mad, I didn’t know what was going on I thought my FTP server was messed up.  Then we figured out that the problem could have been who owned the files.  Surely enough, the files were owned by root instead of a pinhead which was the username I was under.  If your files under your username are owned by root then that will allow your file permissions to be limited and you not to be in control of them.  So how do we fix all this?

MySQL’s Status Command

MySQL’s Status Command

Fadıl

The status allows you to see various stats on the MySQL daemon. To get to your MySQL shell, type the following command at your shell:

[icezip@saturn ~/]$ mysql -u icezip -p

(where icezip is your user name for MySQL)

A prompt will come up and ask you for your password, so go right in and enter it. This will bring up a MySQL shell.

Welcome to the MySQL monitor.  Commands end with; or g.
Your MySQL connection id is 18724 to server version: 3.22.32
Type ‘help’ for help.

Writing To A File Using Fopen

Fadıl

Their will be many different instances when you might need to write to a file.  What we are going to do now is create an HTML form, and a PHP code so when you click submit on the HTML form it writes the users input to a file.

In this PHP script, we are going to be using the /n function, fopen, fput, and fclose commands.

First, we are going create an HTML page that has the following code.

Counting Number Of Entries In A Database

Counting Number Of Entries In A Database

Fadıl

Do you have your own database?  How would you like to know how many entries you have in your database from a PHP page?  Well its easy, I am going to show you a script that will allow you to create a counter that will count the number of entries you have in your database.

Now let’s say we have an email database, and we want to count the number of emails we have in the database.  All we need to do is create this simple script (assuming your database is already made).

New to Mysql? Read the Series and Become an Expert

New to Mysql? Read the Series and Become an Expert

Fadıl

This is the beginning of a series where I will work through the basic Mysql commands that you will need to manage a database. These commands are covered in this part of the series:

CREATE DATABASE,CREATE TABLE,INSERT,SELECT,FROM,WHERE,AND.

Series name: MissJackson part I, starting out
Skill level: Newbie

So you’ve got Mysql installed and if you are like me you can’t wait to enter all your old baseball cards in your new database so you can sell them on eBay, or maybe you won’t put in your
friend’s/girlfriend’s Birthday, favorite music, address, phone number, favorite music artist…( you don’t ever want to forget your girlfriend’s birthday as you may already know…). Anyway
so you got all this important crap, how do you cram it into Mysql? Ok, first you will have to get into MySQL. Once you are in Mysql you’ve got to create a database so you have something to work
with: