MySQL quick start guide



Similar documents
MySQL Quick Start Guide

MySQL Quick Start Guide

Lets Get Started In this tutorial, I will be migrating a Drupal CMS using FTP. The steps should be relatively similar for any other website.

Livezilla How to Install on Shared Hosting By: Jon Manning

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

Content Management System

IIS, FTP Server and Windows

Installing Drupal on Your Local Computer

MOODLE Installation on Windows Platform

TIMETABLE ADMINISTRATOR S MANUAL

Using Internet or Windows Explorer to Upload Your Site

Parallels Plesk Panel User Guide

NAS 109 Using NAS with Linux

Backup and Restore MySQL Databases

What you will need before beginning this guide

MSSQL quick start guide

Customer Control Panel Manual

How to install phpbb forum on NTU student club web server

Installation Tutorial Script: The Real Estate Script. 1. Please login to download script. On PHP Classifieds Script web site.

AJ Matrix V5. Installation Manual

Installing The SysAidTM Server Locally

Sentral servers provide a wide range of services to school networks.

equate Installation QUICK START GUIDE

ProjectPier v Getting Started Guide

Installing buzztouch Self Hosted

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

VP-ASP Shopping Cart Quick Start (Free Version) Guide Version 6.50 March

Getting Started with Dynamic Web Sites

Installation Instructions

What is WS_FTP Server Web Transfer Module?...1 System Requirements...2. What is WS_FTP Server Web Transfer Module?

Customer Tips. Xerox Network Scanning HTTP/HTTPS Configuration using Microsoft IIS. for the user. Purpose. Background

We begin with a number of definitions, and follow through to the conclusion of the installation.

OrangeHRM Web Installation Guide for Windows

The Web Pro Miami, Inc. 615 Santander Ave, Unit C Coral Gables, FL T: info@thewebpro.com

PHP+MYSQL, EASYPHP INSTALLATION GUIDE

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

Site Store Pro. INSTALLATION GUIDE WPCartPro Wordpress Plugin Version

Fasthosts Internet Parallels Plesk 10 Manual

NTT Web Hosting Service [User Manual]

This tutorial provides detailed instructions to help you download and configure Internet Explorer 6.0 for use with Web Commerce application.

Installing CPV Lab Version 2.17

VP-ASP Shopping Cart QUICK START GUIDE Version th Feb 2010 Rocksalt International Pty Ltd

XCloner Official User Manual

How to set up Outlook Anywhere on your home system

Lesson 7 - Website Administration

HowTo. Planning table online

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

Bitrix Site Manager ASP.NET. Installation Guide

Information & Communication Technologies FTP and GroupWise Archives Wilfrid Laurier University

Migrating helpdesk to a new server

How To Set Up A Backupassist For An Raspberry Netbook With A Data Host On A Nsync Server On A Usb 2 (Qnap) On A Netbook (Qnet) On An Usb 2 On A Cdnap (

Professional Mailbox Software Setup Guide

Installation Guide. Research Computing Team V1.9 RESTRICTED

Build it with Drupal 8

Omnistar Recruiter Install User Guide (Codelock)

Transferring Your Hosting Account

MICROSOFT OFFICE 365 EXCHANGE ONLINE CLOUD

VERSION 9.02 INSTALLATION GUIDE.

SETTING UP A LAMP SERVER REMOTELY

How To Set Up An Outlook Mailbox On A Windows 2007 (For Free) With A Free Account On A Blackberry Or Ipad (For A Free) Or Ipa (For An Ipa) With An Outlook 2007 (Free) Or

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

Using LCC s media web server to store files

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

How to Install and Setting Up Drupal

Outlook Profile Setup Guide Exchange 2010 Quick Start and Detailed Instructions

Magento Theme EM0006 for Computer store

How To - Implement Single Sign On Authentication with Active Directory

How to Join QNAP NAS to Microsoft Active Directory (AD)

WHM Administrator s Guide

Web24 Web Hosting Guide

How to install and use the File Sharing Outlook Plugin

shweclassifieds v 3.3 Php Classifieds Script (Joomla Extension) User Manual (Revision 2.0)

NGASI Universal APP Panel Administration and User Guide WebAppShowcase DBA NGASI

1. Building Testing Environment

Upgrading Redwood Engine Software. Version 2.0.x to 3.1.0

FTP, IIS, and Firewall Reference and Troubleshooting

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

Bulk Downloader. Call Recording: Bulk Downloader

1 Classified Script. User Guide v1.0

Scan to Quick Setup Guide

Online Document Delivery Service (ODDS):

1. Product Information

Volume SYSLOG JUNCTION. User s Guide. User s Guide

CEFNS Web Hosting a Guide for CS212

phpservermon Documentation

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

Using Microsoft Expression Web to Upload Your Site

Rensselaer Union Club Webhosting CPanel Guide

Install Apache on windows 8 Create your own server

Online Backup Client User Manual Linux

All the materials and/or graphics included in the IceThemetheme folders MUST be used ONLY with It TheCityTheme from IceTheme.com.

Upgrade ProTracker Advantage Access database to a SQL database

Setting Up a Development Server

HELP DESK MANUAL INSTALLATION GUIDE

Plesk 11 Manual. Fasthosts Customer Support

Drop Shipping. Contents. Overview 2. Quick Tips 3. Basic Setup 4. Drop Ship Options 5. File Pickup Options 6. Messages 8

SOA Software API Gateway Appliance 7.1.x Administration Guide

Transcription:

R E S E L L E R S U P P O R T www.fasthosts.co.uk MySQL quick start guide This guide will help you: Add a MySQL database to your reseller account. Find your database. Add additional users. Use the MySQL command-line tools through SSH. Install phpmyadmin. Connect to your database using PHP. You ll also find links to further information that will help you make the most of your database.

Add a MySQL database to your account You can add MySQL databases to your reseller account directly through your control panel. First you will need to decide the following: the name of your database your preferred database username a password for your database. Step 1 Log into your reseller control panel, then click SQL Databases in the Admin drop-down menu. Step 2 Click the Add a new database button. Page 1 of 11

Step 3 Select the type and size of database you wish to use, then press the Continue button. Step 4 Enter your chosen database name, database username and password, then press Continue. Note: If the database name you have chosen already exists on our system you may see the following error: Unable to complete MSSQL configuration task: Database testdatabase already exists. Choose another name. If your chosen database name is in use, please click Back to the previous page and enter a new name for your database. Step 5 Choose whether you want to pay monthly or annually for your database. Click the Step 4 button to continue. Step 6 A dialogue box will open asking you to confirm the additional payment. Click OK to continue. Step 7 If requested, enter your credit/debit card s CV2 code. This is the last three numbers shown on the card s signature strip. Click Next when you are ready to continue. Step 8 You will now see the details for your new database. Make a note of your database s: server IP address database name database username. Page 2 of 11

Finding your MySQL database Your MySQL database is hosted on a specialised server optimised for MySQL databases. To connect to your database, you must use the database server s IP address. Important: You cannot connect to your database using localhost You can find the server s IP address by logging into your reseller control panel, then clicking SQL Databases in the Admin drop-down menu. On the SQL Databases overview page, make a note of your database server s IP address. Page 3 of 11

Adding users to your database When you add a database to your account, you choose the username and password of the database administration user. Database administrators can choose which level of access different people and applications have to your database. Each database user can have their own username, password and permission to carry out certain tasks. You may prefer to set up new database users with limited permissions to access your database on a day to day basis. Step 1 Log into your reseller control panel, then click SQL Databases in the Admin drop-down menu. Step 2 Click Edit next to the database you wish to add more users to. Step 3 In the box marked Create a new database user enter the username and password of your new user. Step 4 Click the Create user button. You will now see your new database user listed at the top of the screen. Important: New users are created with the SELECT privilege only. You should use phpmyadmin or the MySQL command-line tool to grant further permissions. Page 4 of 11

Connecting to your database using the command line MySQL enables you to access your database through the command-line. This is useful if you want to check your database or perform setup tasks before you start using it. Note: With most web applications, such as blogging, forums and ecommerce, you don t need to use MySQL s command-line tools. If you have a Linux web hosting account, you can use SSH to connect to our Linux servers and start using the MySQL command-line tools straight away. If you have a Windows web hosting account, you can install MySQL on your own PC. Using SSH to connect to our Linux servers http://www.fasthosts.co.uk/knowledge-base/?article_id=79 Installing MySQL on your own PC http://www.fasthosts.co.uk/knowledge-base/?article_id=585 Step 1 At the command line either on your own PC or through SSH log into to your database s server. Example: mysql -h 213.171.218.249 -u fasthoststestuser p testdatabase Page 5 of 11

Note: If you are running Windows and have not installed MySQL, you will see an error message. Step 2 You can check that you have successfully connected to the database by asking for its version and the current date. At the mysql> prompt type SELECT VERSION(), CURRENT_DATE, NOW(); You can find out more about using command-line MySQL in the tutorial at: http://dev.mysql.com/doc/refman/4.1/en/tutorial.html Page 6 of 11

Installing phpmyadmin phpmyadmin is a web application that makes it easy to create and manage your MySQL database. You can download it free of charge and install it in your Fasthosts web space. You can find out how to install phpmyadmin by following the guide below. Unfortunately we are unable to provide email or telephone support for phpmyadmin, but you can read more about phpmyadmin and how to use it in the project s documentation at: http://www.phpmyadmin.net/home_page/docs.php Step 1 Download the most recent stable version of phpmyadmin from: http://www.phpmyadmin.net/home_page/downloads.php phpmyadmin is available in several languages and archive formats. If you are using a Windows PC, choose english.zip. Step 2 Once you have downloaded the installation file, extract it using a suitable tool such as WinZip on Windows or the unzip command on Linux and MacOS X. Step 3 The installation files will be extracted to a folder named phpmyadmin-2.9.1-english, or similar. Rename this folder to phpmyadmin, then use FTP to upload the entire folder to your web space s htdocs directory. Step 4 To maintain your database s security, you should use URL Security to protect your phpmyadmin directory. You can find out how to do this in our knowledge base articles: URL security for Linux - http://www.fasthosts.co.uk/knowledge-base/?article_id=83 Basic URL security for Windows - http://www.fasthosts.co.uk/knowledge-base/?article_id=39 Page 7 of 11

Step 5 Using a text editor, create a new file and enter the following text: <?php $i=0; $i++; $cfg['servers'][$i]['host']='213.171.218.246'; $cfg['servers'][$i]['auth_type']='config'; $cfg['servers'][$i]['user']='demousername'; $cfg['servers'][$i]['password']='trainingpassword';?> // your database server s IP address // Authentication method config, http or cookie // your database username // your database user s password Save this file as config.inc.php and upload it into the phpmyadmin directory you have just created. Quick tip: By default Windows Notepad will save your files with a.txt extension. To save as a.php file, select All files from the file type drop-down list while saving. Step 6 Visit your phpmyadmin folder through your web browser. For example www.yourdomain.co.uk/phpmyadmin Page 8 of 11

Connecting to your database using PHP Using third party applications Many third party applications such as forum, blogging and ecommerce software require a connection to a MySQL database. When you configure your software s connection to the database you will need your: database server s IP address database name database username and password. Connecting from your own scripts To connect to the database from your own PHP scripts use the mysql_connect () function. To connect you will need to specify the IP address, name and user details of your database. For example if we were connecting to a database called demodatabase, on 213.171.218.246 with the username demousername and the password password we would use the following script: <?php $dbhost = '213.171.218.246'; // your database server s IP address $dbuser = 'demousername'; // the database username $dbpass = 'password'; // the database password $conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ('error connecting to your database'); // opens a connection to the server or gives an error $dbname = 'demodatabase'; // the database name mysql_select_db($dbname); // connects to your database?> Page 9 of 11

Connecting using ASP You can also connect to a MySQL database with ASP, described in our knowledge base article DSN-less MySQL connections with ASP at: http://www.fasthosts.co.uk/knowledge-base/?article_id=1078 Step 1 Troubleshooting your connection Typing errors are a common cause of database connection problems. Please check your database s: server IP address username and password name. You can find the server s IP address on the SQL Databases overview page in your Fasthosts control panel, by clicking SQL Databases in the Admin drop-down menu. Step 2 If these details are correct and you are still unable to connect try using testing your database using the MySQL command line tool, as described earlier in this guide. Step 3 Try connecting to your database using the test script provided in our knowledge base article Troubleshooting MySQL connections at: http://www.fasthosts.co.uk/knowledge-base/?article_id=528 Page 10 of 11

Further reading Using SSH to connect to our Linux servers http://www.fasthosts.co.uk/knowledge-base/?article_id=79 Installing MySQL on your own PC http://www.fasthosts.co.uk/knowledge-base/?article_id=585 Command-line MySQL tutorial http://dev.mysql.com/doc/refman/4.1/en/tutorial.html DSN-less MySQL connections with ASP http://www.fasthosts.co.uk/knowledge-base/?article_id=1078 Convert an Access database to MySQL http://www.fasthosts.co.uk/knowledge-base/?article_id=1089 Troubleshooting MySQL connections http://www.fasthosts.co.uk/knowledge-base/?article_id=528 MySQL permissions http://www.fasthosts.co.uk/knowledge-base/?article_id=1081 phpmyadmin downloads http://www.phpmyadmin.net/home_page/downloads.php phpmyadmin project documentation http://www.phpmyadmin.net/home_page/docs.php MySQL functions in PHP http://uk.php.net/mysql Page 11 of 11