Archive for MySQL Web Hosting

Choosing a CMS

CMS stands for content management system; these are systems where you are able to create and modify web pages on the fly since they are database driven applications, most of the best known CMS solutions are open source meaning that they are free. By using a CMS you are able to create and edit the content on your website with easy from any internet connected location; with most CMS applications, add-ons are available allowing you to extend your system to cover many different functions. All systems come with a default design, but theming a CMS to suit the design you want can be done easily through the use of templates. You should only use a CMS if the content on your site needs regular updates, or if your site is a rather large one with alot of content; if you have a small website then a CMS will be of no benefit to you in anyway, it could become an annoyance in certain situations, for example if you’re not going to update your content regularly then you could end up forgetting the administrator password.

Choosing a CMS

Choosing CMS can be either an easy task, or a hard one; the decision of where it is easy or hard is based upon your requirements. If you have fairly simple requirements, for example what operating systems it can run on and whether it is XHTML compliant then you could be in for an easy search since there are CMS solutions available which will run on any operating system, and if the chosen system’s default template isn’t XHTML compliant then you can easily code yourself a custom template which you can make XHTML compliant if you wish. However, if your requirements are much more strict then you could end up having to pay for a premium CMS, or face a hard search for an open source CMS that fits your requirements.

There are universal factors which you should also take into consideration, such as whether the systems you are looking at are SEO friendly and how secure they are. SEO friendly CMS systems will convert your pages to friendly URLs such as ‘http://www.my-cms-site.com/new-article/cat-falls-down-drain-after-slipping-off-tree-branch’, in that case the CMS has taken the article title o ‘Cat Falls Down Drain After Slipping Off Tree Branch’ and converted it into a URL which search engines will consider friendly – these types of URLs can end up with a search engine such as Google giving you a higher rank. Security is also a big factor concerning CMS systems; open source systems are remarkebly insecure since they are available to anyone meaning that a hacker can easily get a copy and find the exploits within, once they have found the exploits they can then go on to targeting websites based on the system concerned; SQL injections are also easily executed on open source systems.

The following is a list of open source CMS systems which you should consider trying out:

  • Joomla – http://www.joomla.org
  • PHPNuke – http://www.phpnuke.org
  • Drupal – http://www.drupal.org

You will find that all of the ones listed above are powered by PHP and MySQL; these two systems are used in most open source CMS, and both are available on most operating systems.

Installing a CMS 

Installing a CMS can be a very easy task; all you have to do is download the system, upload it to your web space via FTP, setup a blank database and then set permissions on some files to ’777′ – thats the technical part done. Most systems have specially built setup wizards ready made to make the installation as easy as possible. There is also a range of open source CMS available for instant installation from the CMS category within Fantastico, if you are on cPanel based website hosting. The following is a list of free guides which you can use to help you install some of the most popular open souce CMS:

  • How to Install Joomla – http://www.joomlatribune.com/joomla-tutorials/how-to-install-joomla-cms.html
  • How to Install Drupal 5 (Videocast) – http://www.lullabot.com/videocast/installing_drupal_5
  • How to Install PHPNuke – http://www.trap17.com/index.php/how-install-php-nuke_t22493.html
  • How to Install Mambo – http://www.siteground.com/tutorials/mambo/mambo_installation.htm
VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Installing Apache, MySQL and PHP on a Linux Server in Under 10 Minutes

Apache, MySql and PHP; these three products are open source programs available for use on most well known operating systems. In this article I will explain how you can install Apache, MySql and PHP on a Linux box using yum in under 10 minutes.

1 – Checking and Removing Any Existing Installations of the 3 of Them

Run the following command to make sure that any existing installations of Apache, MySql or PHP are removed:

yum -y remove httpd mysqld mysql-server php

2 – Installing Apache

Run the following to install the Apache web server:

yum -y install httpd

3 – Installing MySql Server

Run the following command to install MySql Server:

yum -y install mysqld mysql-server

4 – Install PHP

Run the following command to install PHP:

yum -y install php php-mysql

5 – Installing PHP Libraries

PHP has many different libraries and add-ons which you want or need to utilize; in your case we want to install the PHP GD image library and the PHP IMAP library, to do this we’ll be using the following command:

yum -y install php-gd php-imap

Thats it – you have now AMP’d a server! All you need to do now is start the individual services, to do this run the following commands (individually):

service httpd start

service mysqld start

PHP will be seen by Apache as a library and so does not need to be started.

VN:F [1.9.17_1161]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Create MySQL database and tables on shell

Here are steps explained below to create mysql database and tables from shell

1)Create database from shell

Use the SHOW statement to find out what databases currently exist on the server:
mysql> SHOW DATABASES;

Create database from shell as per following

mysql> create datbase testdb;

mysql> USE testdb;
Database changed

2) Grant privileges of database to specific user

mysql> GRANT ALL ON testdb.* TO user@’localhost’; /*here you can specify username to which you want assign privileges */

Connect database testdb as per following

shell> mysql -h host -u user -p testdb

host = localhost
u= username
p= password

3)Check for tables in database testdb

mysql> SHOW TABLES;
Empty set (0.00 sec)

4)Use a CREATE TABLE statement to specify the layout of your table:

mysql> CREATE TABLE testtab (name VARCHAR(20), age int(3), sex CHAR(1), birth DATE);

varchar,int, char are datatype used in mysql to store data in specific rows and columns

5)To verify that your table was created the way you expected, use a DESCRIBE statement:

mysql> DESCRIBE testtab;
+———+————-+——+—– +———+——-+
| Field | Type | Null | Key |Default | Extra |
+———+————-+——+—– +———+——-+
| name | varchar(20) | YES | NULL | | |
| Age | int(3) | YES | NULL | |
| sex | char(1) | YES | NULL |
| birth | date | YES | NULL | | |
+—— +————- +——+—– +———+——-+
6)
Loading Data into a Table
After creating your table, you need to populate it. The LOAD DATA and INSERT statements are useful for this.

Suppose that your pet records can be described as shown here. (Observe that MySQL expects dates in ‘YYYY-MM-DD’ format; this

may be different from what you are used to.)

name owner species sex birth death
Alan m 1993-02-04
Jason m 1994-03-17
Nancy f 1989-05-13
Steven m 1990-08-27

7)Load data in rows

Create a text file testtab.txt containing one record per line, with values separated by tabs, and given in the order in which

the columns were listed in the CREATE TABLE statement. For missing values (such as unknown sexes or death dates for animals

that are still living), you can use NULL values. To represent these in your text file, use \N (backslash, capital-N). For

example, the record for Steven m 1990-08-27 would look like this (where the whitespace between values is a single tab

character):

Steven m \n 1990-08-27 \n

To load the text file pet.txt into the pet table, use this command:

mysql> LOAD DATA LOCAL INFILE ‘/path/testtab.txt’ INTO TABLE testtab;

VN:F [1.9.17_1161]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Features of MySQL 5.0

The following features are introduced in MySQL 5.0.

BIT Data Type: It is used for store numbers in binary format.

Cursors: Can use server-side cursors.

Data Dictionary (Information Schema): This feature introduced in MySQL 5.0 provides a standards-compliant means for accessing the MySQL Server’s metadata; that is, data about the databases (schemas) on the server and the objects which they contain.

Instance Manager: Can be used to start and stop the MySQL Server, even from a remote host.

Precision Math: Used for acceptance or rejection of data, and implemented a new library for fixed-point arithmetic.
These feature has been introduced for much higher degree of accuracy for mathematical operations and greater control over invalid values.

Storage Engines: Storage engines added in MySQL 5.0 include ARCHIVE and FEDERATED.

Stored Routines: Support for named stored procedures and stored functions

Strict Mode and Standard Error Handling: MySQL 5.0 added a strict mode where by it follows standard SQL in a number of ways in which it did not previously. Support for standard SQLSTATE error messages was also implemented.

Triggers: MySQL 5.0 added limited support for triggers.

VARCHAR Data Type: The maximum effective length of a VARCHAR column was increased to 65,535 bytes, and stripping of trailing whitespace was eliminated. (The actual maximum length of a VARCHAR is determined by the maximum row size and the character set you use. The maximum effective column length is subject to a row size of 65,535 bytes.)

Views: support for named, updatable views.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

MySQL Admin Commands

MySQL Admin Commands:

* Statistics: [prompt]$ mysqladmin version
* List database environment: [prompt]$ mysqladmin variables
* Show if database is running: [prompt]$ mysqladmin ping
* Show databases available:

[prompt]$ mysqlshow

OR

mysql> SHOW DATABASES;

* Delete database: mysql> drop database databasename;
* Show list of active threads in server:

[prompt]$ mysqladmin -h localhost -u root -p processlist

* Delete a database: [prompt]$ mysqladmin drop database-name
* Execute SQL from Linux command line interface:
[prompt]$ mysql -h localhost -u root -p -e “select host,db,user from db” mysql
* Execute SQL command file from Linux command line interface:

[prompt]$ mysql -h localhost -u root -p database-name

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts:

  • No Related Posts

Last updated by at .

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »