Config file – where to turn on/off error msg
Doesn’t have to depend on a database to have it work
MySQL(continued):
Assignment 4:
Lesson 9 – Unix, Command Line, File Permission (continued)
Re-captcha : takes magazines form the past and tries to do an optical scan of words…. It goes in a database, where one word needs to get right, the other word is unknown
Repurchased by google, as a project
Unix: IDEAL, and have been around longer(takes less deal of brainpower to get it up and running)
- Free, accessed anywhere
- Hosting hardware – web server software (apache)
Windows: IIS (web software version)
Windows: IIS (web software version)
- Command line - Can speak directly to server (do almost everything with some limitations)
- Ports: (doorways to servers)
- Use the real name, no http:// protocol
Database and web server NOT always on the same machine
(security & accessibility)
(security & accessibility)
Number of web servers to MySQL servers- 4 (servers) : 1 (database)
- Can re-allocate the work load better if different machines have dedicated storage
drwxr-xr--
d - directory
rwx – Owner/you, whoever is logged in
(if on web, “you” are unknown, you are “everyone” or “public”)
(note: owner doesn’t automatically get full access)
(if on web, “you” are unknown, you are “everyone” or “public”)
(note: owner doesn’t automatically get full access)
r-x Others to access (to run/open img files)
r-- what the public can do to your file
Values
rwx = 4 + 2 + 1 = 7 rw- = 4 + 2 + 0 = 6 r-x = 4 + 0 + 1 = 5 r-- = 4 + 0 + 0 = 4 | r has a value of 4 = read w has a value of 2 = write x has a value of 1 = execute - has a value of 0 = not applicable |
Uploading a file is dangerous (web browser will treat files as best as it can base on the file extension)
Viewing permission files in zephir looks something like this:
NOTE: always try and change your file permission on the server, only change it when you know better Trust the server but notice what it does Different hosting servers will give you error permission guides |
Setting files recursively – go through the entire folder and repeat itself
Directory browsing: when there is NO index
Speed of operation: “not in fashion”
only build a database when necessary- databases are slower to load (ideal is small)
MySQL Moniter - command line in MySQL
Building a database:
Entity > Attribute (list of the item & view it within the same page)
Tables > Fields (how it’s stored in the database)
Object > Property
Structured Query Language:
| - Each piece gets broken up into columns o CustomerID (stays the same) o LastName o FirstName o Email Primary key: is NOT inherently known to computer | Example: (written like this) create table test_Customers ( CustomerID int unsigned not null auto_increment primary key, LastName varchar(50), FirstName varchar(50), Email varchar(80) ); |
| Naming Convention: No space, CamelCase or underscore, NO funny characters - Semi-colon: ending the statement (can me a multiline, but semi-colon ends it) - Commas: separate the attributes - Comment: # sign or /* */ MySQL Data Types:- Char(number): fixed length string - Varchar(number): variable length string with max indicated (with Strings) entry can’t exceed this number (individual data name) · Truncate – chops off the last characters that exceeds (silently, without exploding) - Int: used for numbers - Null( nothing was ever there) versus not null (something was there but is now empty) - Text: field designed to accept 65,000 char - Blob: field designed to accept large fields/ image data, etc | |
Structure internally of a database:
.sql – file extensions for MySQL file
MySQL (continued):
Log on with putty:
horsey01 > 6 SID > mysql –u horsey01 –p > my_sql_password
use horsey01 to
- % is a wildcard symbol, it represents any symbol

No comments:
Post a Comment