Using MySQL Database on WebHostingHub

how important is a MySQL Database

topimg
mysql icon databaseThe speed and reliability of a website and its applications are often dependent upon how the files and the contents are organized. Think about an office where all files are stocked together in a huge room, without cabinets and without labels, where the files are arranged helter-skelter. If this is a typical office arrangement, then it might possibly take days and days or even weeks to search for and locate, and retrieve a much needed file.

However, offices with files neatly arranged into labelled compartments, where interrelated files are grouped together and where the filling system is structured and organized properly may find the task of retrieving files fast, smooth and easy. This is why MySQL Database is important. A MySQL Database (SQL, standing for Structure Query Language) is an efficient relational database management system that works to organize the structure of a site’s database.

chalkboard fasterThe more organized and structured the database is, the faster, more efficient and more reliable the site and its applications will be. And why should this be important? It is an accepted fact that the success and the future of a website is dependent upon its reliability, speed and functionality. Most applications, such are eCommerce solutions, forums and even Content Management Systems (CMS) rely upon MySQL databases to run.

how can i set up a remote mysql connection

third party software installerWhen you connect to your database using a third party software, you may need to make a remote MySQL connection to your database at your WebHostingHub hosted site. However, making a connection involves two different processes; first you need to add an IP address needed to make a remote connection and second, making the remote MySQL connection to the database itself.

It is important to remember that, for security reasons, only confirmed IP addresses can directly connect to a MySQL database. If you want to connect to your database using your current connection but do not know your IP address, try visiting any of WebHostingHub’s landing pages, such as (http://ehub22.webhostinghub.com/) and get your IP address. Once obtained, you may now do the following steps:

    • number 1Login to your cPanel;
    • number 2Under the subheader “Databases”, locate and select “Remote MySQL”;
    • number 3You will be brought to a page where you can add your IP address. All you have to do is to input your IP address, either by typing or by copying and pasting it into the box provided. Copying and pasting is highly recommended to make sure that you inputted the right IP address.
    • number 4Once pasted, click on the “Add Host” tab. And there it is, you should now be ready to connect to your database.
internet connectionYou should now be able to connect to your MySQL database from the IP address you added. To make the connection, you should have the following information handy, as these are needed to establish the connection.

You may either use programs such as HeidiSQL or Navicat to connect remotely.

  • Hostname – this is your domain name, yourdomain.com – yourdomain being your actual domain name;
  • Database Name – is the database name of the one you are connecting to. If you are not sure of the name of the database, try finding it from the list of databases in the MySQL databases of your cPanel.
  • Username – this is NOT your cPanel username but rather the username that has access to the database;
  • Password – again, this is NOT your cPanel password, but the password of the username that has access to the database.

I have received a 1044 Access Denied error in MySQL, how can I resolve it

error 1044A 1044 Access Denied error message often appears when your database was imported using phpMyAdmin. This usually happens because files imported through phpMyAdmin carry a .sql extension. To illustrate the problem better, let me try to give you a typical database with the name, let’s say expenses.
  • phpMyAdmin SQL Dump
  • version 2.11.9.5
  • http://www.phpmyadmin.net
  • Host: localhost
  • Generation Time: Apr 09, 2014 at 5:44 AM
  • Server Version: 5.0.81
  • PHP Version: 5.2.6

SET SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’;

CREATE DATABASE expenses;
Take structure for table ‘expenses_list’

CREATE TABLE IF NOT EXISTS ‘expenses_list’

‘item_name’ text NOT NULL
‘item_cost’ text NOT NULL
ENGINE=MyISAM DEFAULT CHARSET=latin1

If you attempt to import this file, you are sure to receive a message like this:

Error
SQL query;

CREATE DATABASE expenses;

MySQL said: Documentation
#1044-Access denied for user ‘[email protected]’ to database ‘expenses’

my sql add table server hosting databaseThe reason why the import failed id because of this line CREATE DATABASE expenses in the .sql file. You see, all databases in cPanel’s naming conventions must begin with the cPanel username followed by a _. If we follow this convention, we can only create a database with a name joel_expenses, joel being cPanel username.

To correct this problem, you need to do the following:

  • You need to create the joel_expenses database within cPanel;
  • Then, comment out the CREATE DATABASE command in the .sql file. Simply add two dashes before the word CREATE to comment it out. This means that the command will not be executed.
  • Change the CREATE DATABASE expenses to –CREATE DATABASE expenses
  • After the change, login to phpMyAdmin and then access the joel_expenses database and then import it normally.

Can I check and repair a MySQL Database

fix serverNormally, you don’t have to do this as MySQL Databases are known for its stability but if in case you do need to check and repair, like for instance a software suddenly stops working properly, then you can troubleshoot your MySQL Database.

To check and repair, you need to:

    • number 1Login to your cPanel;
    • number 1Click the “MySQL Databases”;
    • number 1Then, under the “Modify Databases” header, select the desired database from the dropdown menu and then click “Check DB”;
    • number 1If the check shows any errors, return to the previous screen then click the “Repair DB”;

Leave A Response