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

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.

主站蜘蛛池模板: 武义县| 白城市| 黔江区| 清涧县| 剑阁县| 富蕴县| 长寿区| 临澧县| 云阳县| 茌平县| 鹤山市| 石狮市| 页游| 吉隆县| 镇坪县| 诸城市| 栾城县| 南投县| 金沙县| 精河县| 尉犁县| 龙井市| 马龙县| 白山市| 九江县| 南乐县| 丰顺县| 大兴区| 文昌市| 博湖县| 泽库县| 晋中市| 荃湾区| 兴安盟| 巫山县| 类乌齐县| 德令哈市| 高邑县| 眉山市| 筠连县| 霞浦县|