官术网_书友最值得收藏!

Chapter 2. Working with phpMyAdmin

In this chapter, we will cover:

  • Exporting a database
  • Importing a database
  • Working with database rows and tables
  • Removing a table
  • Emptying a table

Introduction

In the first chapter and recipes, you were shown how to setup a database and establish users. The tool for driving this is called, phpMyAdmin.

phpMyAdmin is a popular, open-source tool that is a standard on most web hosts. Written in PHP, it enables you to handle all the administration of your MySQL database, keeping you from working in the command-line mode.

Here is an example of a command for setting up a new user:

CREATE USER 'jcookbookadmin'@'localhost' IDENTIFIED BY 'MyPassword';

or creating a database

CREATE DATABASE jbookdb;

or assigning privileges to it

GRANT ALL PRIVILEGES ON 'jbookdb' . * TO 'jcookbookadmin'@'localhost';

As you can see, attempting to remember all those commands is probably more than you want or need.

As Joomla! is primarily a database-powered system, from time to time you will need to know your way around phpMyAdmin for some of the tasks you may face.

One important item that phpMyAdmin can help you with is exporting your database. What this means is backing up your database and putting it in a safe place.

In later chapters, you will learn how to install and use tools to assist with backup and recovery; however in an emergency having knowledge of this tool is important.

This tool can also be dangerous and I STRONGLY RECOMMEND, you backup your database (using export) before you try anything. That way you can quickly restore it.

Before diving in, let's learn some terms that are used in describing databases.

主站蜘蛛池模板: 灌阳县| 斗六市| 城固县| 洱源县| 筠连县| 海宁市| 平定县| 龙泉市| 明光市| 临海市| 赤水市| 东辽县| 昔阳县| 米易县| 乌苏市| 榆树市| 康乐县| 五峰| 富源县| 教育| 故城县| 宁波市| 泗水县| 玉林市| 云南省| 五寨县| 邵阳市| 樟树市| 清徐县| 来宾市| 湖州市| 军事| 大关县| 友谊县| 石楼县| 禄丰县| 哈巴河县| 策勒县| 江川县| 云霄县| 大化|