Accessing phpMyAdmin and MySQL with Plesk

June 6, 2008

Windows web hosting and MS SQL databases go hand in hand, just like Linux web hosting and MySQL are the most compatible. But what happens if you’re looking to use MySQL with your Plesk control panel in your Windows Server Hosting account?

Here’s a simple tutorial that should help you access phpMyAdmin using Plesk.

First, you’ll want to login with the username and password you got from your dedicated web host.

In order to access phpMyAdmin, you must first have created a MySQL database, so if you have not done that yet, do so now before you proceed.

Once the database with MySQL has been created, click on the “Database” icon in your Plesk control panel and choose whichever database you want to manage. Finally, click on the “DB WebAdmin” icon, where a popup window will open for phpMyAdmin.

NOTE: If nothing pops up, your popup blocker might be preventing this, so double check your settings and proceed once you can access the phpMyAdmin popup.

From there, you can edit tables, fields, data, and perform backups and delete your MySQL databases, right from phpMyAdmin!

If you’re using cPanel, it’s a bit easier: simply click on the icon above the words “MySQL Databases” on the main cPanel interface screen and then you’ll see phpMyAdmin and you can go from there!

So either way, whether you’re using Plesk or cPanel, you will be able to access phpMyAdmin with your dedicated server.

Dedicated Hosting for the Next Facebook?

May 30, 2008

You want to be the next Facebook or MySpace, you had better have a deep pocket.  Now putting aside the fact that you would need a lot of users, social praise and traffic to make this all work - according to one web site resource these are the current stats for Facebook on the hosting side of things:

30,000 databases & 1,800 db servers

1200 dedicated servers

805 caching servers

Now with any dedicated hosting provider out there you could get a good start if nothing else.  Many of the social network clone scripts will run on a VPS or dedicated hosting plan too.  This is just to give you a little insight on what you may be getting yourself into.

More Help with Securing Dedicated SSH

May 21, 2008

After yesterday’s article I thought I would also list an alternative way to help secure the SSH.  You can also secure your ssh changing default port (22).  Change the port that SSH listens for connections on:

      #Port 22
      Port XX    (where XX = your new portnumber)

You can choose something like 22202 or something you can remember.

You are now done editing the /etc/ssh/sshd_config file (save your changes, and quit your editor).
Another important thing dont forgot to allow the port you choose from firewall:

      /etc/apf/conf.apf

Then you add there your new ssh port.  Hope you enjoyed.  Any good dedicated hosting provider should be able to provide you with additional help if needed.

What is Apache?

April 23, 2008

Apache, or sometimes known as Apache HTTP server is one of those magical things that make the web go around.  If your server hosting was a picnic at the park, then Apache would be the blanket under that picnic meal. 

It is used to serve static and dynamic content from a server on the web.  Many of the Web’s applications are designed with Apache in mind or thanks to what it provides.  It is the web server component also of the popular LAMP (linux, apache, mysql, perl).  The biggest competitor to Apache is Microsoft’s IIS or Internet Information Services as it is sometimes called.

There is some debate as well on how Apache got it’s name.  Some people say it was named after the Indian tribe with the same name and others say that it was due to the project’s roots as a set of patches to the codebase of NCSA HTTPd 1.3 - making it “a patchy” server.

Database Management System

April 11, 2008

Database Servers are becoming more and more popular these days, as technology professionals not only need a server to run their website for web server hosting but they also require the functionality and performance of a reliable database server. And in setting a database server up, you not only need affordable dedicated web hosting but also a database management system.

So what is a database management system?

A database management system (or DBMS) is more or less a piece of software that helps you organize, store, manage, edit, and retrieve of data in a database or databases from your server. Like content management system (CMS), it is setup to do these things as easily as possible for you.

There are many database management systems around, but here is a quick list of some of the most popular choices for dedicated server hosting:

  • Oracle
  • Microsoft Access
  • Microsoft SQL Server
  • Firebird
  • PostgreSQL
  • MySQL
  • SQLite

LAMP Web Hosting

April 10, 2008

Like Ruby on Rails and Web 2.0, LAMP has become one of the most popular and trendy keywords for software and application development these days. But, do you know what LAMP stands for or what it means as you choose a dedicated web host? LAMP is actually incredibly important to application servers, web servers, and software distribution, so if you are planning to purchase a dedicated server for exactly these purposes, you should definitely research this solution stack.

So what is LAMP?

LAMP stands for the solution stack of free, open source software that produces dynamic websites and allows for web server, application server, and easy software distribution. LAMP is actually an acronym for the open source software that it comprises:

L – Linux: the operating system on which LAMP can be hosted
A – Apache: the actual web server
MMySQL: the database system used for database management
P – PHP, Perl, and Python: the programming languages that can develop the software

Each of these four technologies can be utilized separately, but together, they provide dedicated web developers the chance to dazzle. More importantly, they are more than likely bundled together anyway, as Linux, PHP, and MySQL are almost 100% of the time found beside each other, and the Apache web server is one of the most popular choices.

There is an extremely low cost associated with LAMP web hosting, as all of the LAMP solutions are completely free. The only real cost is the hosting account itself or dedicated server hosting you purchase.

MySQL Web Hosting

There are many different dedicated server and web hosting technologies available to use when building and accessing your website. Probably the most popular free tool for database web hosting is MySQL.

So what is MySQL Web Hosting?

MySQL (pronounced My-Ess-Queue-El or My-See-Quel) is an open source or free database software, providing ease and speed to its resource base. MySQL boasts over 100 million downloads of this extremely familiar database software, and for good reason – most web hosting companies these days utilize MySQL for their databases and offer it free to their customers for database management as well.

The popularity of MySQL web hosting really came into light as a new application pack for technology was devised called LAMP (Linux, Apache, MySQL, PHP/Perl/Python). This, coupled with the fact that MySQL can be used on Linux as well as Windows and over 20 other platforms, makes MySQL hosting a huge choice for developers and webmasters in the dedicated web hosting and shared hosting fields.

Backing up MySQL Databases Automatically on a Dedicated Server

April 7, 2008

Backing up your website is extremely important to the server security of your dedicated server, but you can’t forget about your server databases either! Your MySQL databases are the backbone of your website, especially if you are using it for database server hosting. In either situation, you cannot rely on manual backups of your dedicated server databases if you access them every day and if they are integral to your website’s success and uptime.

So below, we have included some helpful scripts that can be setup via cron jobs (scheduled tasks) on your server. These will automatically backup your databases for you, so you’ll never have to worry again! There are two options for these backups – you can either have them emailed to you or FTPed to you, both of which will assist with your dedicated web hosting experience.

MySQL backup via cron - Emailed to You

<?
$datestamp = date(”Y-m-d”); // Current date to append to filename of backup file in format of YYYY-MM-DD

/* CONFIGURE THE FOLLOWING SEVEN VARIABLES TO MATCH YOUR SETUP */
$dbuser = “”; // Database username
$dbpwd = “”; // Database password
$dbname = “”; // Database name. Use –all-databases if you have more than one
$filename= “backup-$datestamp.sql.gz”; // The name (and optionally path) of the dump file
$to = “you@remotesite.com”; // Email address to send dump file to
$from = “you@yourhost.com”; // Email address message will show as coming from.
$subject = “MySQL backup file”; // Subject of email

$command = “mysqldump -u $dbuser –password=$dbpwd $dbname | gzip > $filename”;
$result = passthru($command);

$attachmentname = array_pop(explode(”/”, $filename)); // If a path was included, strip it out for the attachment name

$message = “Compressed database backup file $attachmentname attached.”;
$mime_boundary = “<<<:” . md5(time());
$data = chunk_split(base64_encode(implode(”", file($filename))));

$headers = “From: $from\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: multipart/mixed;\r\n”;
$headers .= ” boundary=\”".$mime_boundary.”\”\r\n”;

$content = “This is a multi-part message in MIME format.\r\n\r\n”;
$content.= “–”.$mime_boundary.”\r\n”;
$content.= “Content-Type: text/plain; charset=\”iso-8859-1\”\r\n”;
$content.= “Content-Transfer-Encoding: 7bit\r\n\r\n”;
$content.= $message.”\r\n”;
$content.= “–”.$mime_boundary.”\r\n”;
$content.= “Content-Disposition: attachment;\r\n”;
$content.= “Content-Type: Application/Octet-Stream; name=\”$attachmentname\”\r\n”;
$content.= “Content-Transfer-Encoding: base64\r\n\r\n”;
$content.= $data.”\r\n”;
$content.= “–” . $mime_boundary . “\r\n”;

mail($to, $subject, $content, $headers);

unlink($filename); //delete the backup file from the server
?>

MySQL backup via cron - FTPed to You

<?
$datestamp = date(”Y-m-d”); // Current date to append to filename of backup file in format of YYYY-MM-DD

/* CONFIGURE THE FOLLOWING THREE VARIABLES TO MATCH YOUR SETUP */
$dbuser = “”; // Database username
$dbpwd = “”; // Database password
$dbname = “”; // Database name. Use –all-databases if you have more than one
$filename= “backup-$datestamp.sql.gz”; // The name (and optionally path) of the dump file

$command = “mysqldump -u $dbuser –password=$dbpwd $dbname | gzip > $filename”;
$result = passthru($command);

/* CONFIGURE THE FOLLOWING FOUR VARIABLES TO MATCH YOUR FTP SETUP */
$ftp_server = “”; // Shouldn’t have any trailing slashes and shouldn’t be prefixed with ftp://
$ftp_port = “21″; // FTP port - blank defaults to port 21
$ftp_username = “anonymous”; // FTP account username
$ftp_password = “”; // FTP account password - blank for anonymous

// set up basic connection
$ftp_conn = ftp_connect($ftp_server);

// Turn PASV mode on or off
ftp_pasv($ftp_conn, false);

// login with username and password
$login_result = ftp_login($ftp_conn, $ftp_username, $ftp_password);

// check connection
if ((!$ftp_conn) || (!$login_result))
{
echo “FTP connection has failed.”;
echo “Attempted to connect to $ftp_server for user $ftp_username”;
exit;
}
else
{
echo “Connected to $ftp_server, for user $ftp_username”;
}

// upload the file
$upload = ftp_put($ftp_conn, $filename, $filename, FTP_BINARY);

// check upload status
if (!$upload)
{
echo “FTP upload has failed.”;
}
else
{
echo “Uploaded $filename to $ftp_server.”;
}

// close the FTP stream
ftp_close($ftp_conn);

unlink($filename); //delete the backup file from the server
?>

**MAKE ABSOLUTELY SURE that either script you use from above includes a .php extension. That file should have 755 permissions, and you MUST change the first variables to those specific to your website’s setup. Also, you MUST have a cron job setup in Cpanel and the path to the script needs to look like this: php /home/username/path-to-the-php-script. Just make sure you replace path-to-the-script with your script’s physical path. ;)

Backing up Your Website & Database on a Dedicated Server

April 4, 2008

One of the first things you will notice about having a dedicated web host is that there is a fix for everything. Even if your server’s databases go down or you make a mistake that causes you to lose these databases, there is an easy way to back them up before you test scripts or applications so that you’ll never lose a thing on your dedicated server.

So how do you backup your MySQL databases using cPanel on a dedicated server?

1. First, navigate to cPanel and login.

2. Then, click on the “Backup” icon in cPanel and find your database’s name. Once you click on this, it will download a gzipped copy straight to your computer, where you can store it for future restores.

**You can also use the PHPMyAdmin feature via your dedicated server’s control panel by clicking on MySQL and then “phpmyadmin” at the bottom. In PHPMyAdmin, simply select the database that you need to backup and then click the export tab on the right. You can choose one specific table, several tables, or all tables to backup. When you’ve chosen the appropriate table(s), simply tick “save file as” and click “go” – you can then save the databases straight to your computer!

If you have the patience to manage your dedicated server periodically like this, backing up your databases regularly is a great idea. However, there are also automated solutions for site and MySQL backups using cron jobs.

Plesk Power Pack Web Hosting Features

March 28, 2008

When you purchase your Windows or Linux Dedicated Server, you have the option to add the Plesk Control Panel, one of the most powerful control panels on the planet. And if you do decide to add Plesk as your control panel, you also have the ability to add the Plesk Power Pack, a series of amazing add-on modules similar to cPanel’s Fantastico Script Library.

So what do you get with your dedicated server and the Plesk Power Pack?

  • Application Pack – With the Plesk Power Pack’s Application Pack, you can pretty much do everything you need, all from one simple administrative panel. The Application Pack comes complete with the Mambo Content Management System (CMS), a Website Builder Tool to create dynamic websites, support for post-Nuke Web Hosting, osCommerce Ecommerce software for ecommerce web hosting, phpBB software, picture gallery software, phpBook for guestbooks, bbClone for website statistics, and gtChat for chat web hosting.
  • Anti-Spam Solutions – Plesk’s Power Pack utilizes SpamAssassin’s Anti-Spam solutions software to eliminate spam forever.
  • Tomcat Web Hosting – Tomcat java servlet support allows you to manage and deploy Tomcat web applications and run Tomcat’s JSP web hosting.
  • ColdFusion Web Hosting – Administrators can configure and enable/disable ColdFusion right within the hosting panel. Perfect for ColdFusion web hotsing.
  • MS SQL Hosting – Need the world’s most popular and powerful relational database manage system? You got it with Plesk Power Pack’s support for MS SQL web hosting. You can deploy and manage MS SQL databases on local and remote instances. Your Windows Web Hosting solution is complete. Also perfect for Windows Server 2008 Hosting!
  • Multi-Level Helpdesk – Now you can run your own HelpDesk solution for answering tickets and support inquiries via a powerful integration system within Plesk’s Power Pack.