How Do I Use MySQL?
SQL stands for Structured Query Language. SQL is an international standard in querying and retrieving information from databases. MySQL is essentially an SQL server - it responds to requests for information that are written in SQL. You can communicate with MySQL using a wide variety of programming languages (PHP being one of the most common). MySQL is Open Source software and free for use.
Refer to the following links for more information about MySQL :
- MySQL - The MySQL homepage.
- MySQL and PHP tutorial - A good introduction to using the two Open Source technologies together.
Creating a Database | Removing
a Database | Creating a User
Granting Permissions | Managing
a Database | Adding Host Access
Create a Database
To create a MySQL database:
- Click on the MySQL databases button on your cPanel home page.
- Enter the name of the database in the Db field.
- Click on the Add Db button. You need to create at least one database user and grant that user permission to use the new database.
Removing a Database
Removing a database will delete that database from its online location. Be sure that you have saved a copy of the database if you want to keep any of the information in the database. Removing a database will not remove any user's but it will remove all user's permissions to that database.
To remove a database:
- Click on the MySQL databases button on your cPanel home page.
- Click on the Delete button next to the specific database.
Creating a User
You need to create a MySQL user before that user is able to use the database. This does not automatically allow the user to use a database - you need to grant that user permission to the specific database first. Refer to Grant a user's permissions for more information.
To create a MySQL user:
- Click on the MySQL databases button on your cPanel home page.
- Enter the user's name in the UserName field and the user's password in the Password field.
- Click on the Add User button.
Granting User Permissions
Once you have created a user to use a database you need to grant that user permission to use the database.
To grant user permissions to a MySQL database:
- Click on the MySQL databases button on your cPanel home page.
- Choose the specific user from the User drop-down list and the specific database to grant permissions to from the dB drop-down list.
- Click on the Add User to dB button. The user now has permission to use that database and sample connection strings are shown in the MySQL window.
Managing the Database
cPanel includes a web-based MySQL management tool called phpMyAdmin. This tool allows you to manage all aspects of your database structure and data.
Note: Refer to the phpMyAdmin documentation if you need to know more about using phpMyAdmin.
To manage MySQL databases using phpMyAdmin:
- Click on the MySQL databases button on your cPanel home page.
- Click on the phpMyAdmin link at the base of the window.
Adding Host Access
You can allow external web servers to access your MySQL databases by adding their domain name to the list of hosts that are able to access databases on your web site. localhost stands for your own web server.
To add host access:
- Click on the MySQL databases button on your cPanel home page.
- Enter the domain name or IP number of the host that you wish to add in the Host field.
- Click on the Add Host button.
Creating a Database | Removing
a Database | Creating a User
Granting Permissions | Managing
a Database | Adding Host Access
Getting Started
Passwords
Which Folder Do I Use?
How Do I View My Site?
All About FTP
All About Using File Manager
How Do I Backup My Site?
How Do I Edit an Email Account?
Setting Your Default Email Address
How Do I Access Webmail?
How Do I Change My Email Password?
How Do I Set Up Outlook to Pick up Mail?
I receive an error when I try to send email How Do I Create an Autoresponder?
How Do I Block Unwanted Email?
How Do I Create an Email Alias/Forwarder?
How Do I Create a Mailing List?
How Do I Use Spam Assassin?
Domains
Site Management
About Your Raw Access Logs
About the Raw Access Log Manager
Redirects
How Do I Install Frontpage Extensions?
About Cron Jobs
What are MIME Types?
What are Apache Handlers?
How Do I Manage OpenPGP Keys?
Hotlink Prevention
About the Index Manager
About the IP Deny Manager
How Do I Create Custom Error Pages?
Install Guides
Databases
