Danh mục

MySQL Administrator's Bible- P3

Số trang: 50      Loại file: pdf      Dung lượng: 2.87 MB      Lượt xem: 9      Lượt tải: 0    
Hoai.2512

Hỗ trợ phí lưu trữ khi tải xuống: 6,000 VND Tải xuống file đầy đủ (50 trang) 0
Xem trước 5 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

MySQL Administrators Bible- P3: Với tập trung đặc biệt vào việc phát hành lớn tiếp theo của MySQL, nguồn tài nguyên này cung cấp một khuôn khổ vững chắc cho bất cứ ai mới vào MySQL hoặc chuyển từ một nền tảng cơ sở dữ liệu, cũng như các quản trị MySQL kinh nghiệm. Các bộ đôi tác giả cao hồ sơ cung cấp bảo hiểm thiết yếu của các nguyên tắc cơ bản của phạm vi bảo hiểm cơ sở dữ liệu quản lý, bao gồm cả cách tiếp cận độc đáo MySQL của các tính năng cơ sở...
Nội dung trích xuất từ tài liệu:
MySQL Administrators Bible- P3 Accessing MySQL 3the server host and the mysqld instance. If you experience any problems SQLyog has very thor-ough, context-sensitive help. Figure 3-1 shows this connection dialog. FIGURE 3-1SQL query creationSQLyog has two methods of SQL query creation. With the first method you type the query in aquery building window. SQLyog provides two tools to assist you — the auto-completion featureand SQL templates. mysql does not have tab completion on Windows (see the previous sectionon mysql features). With SQLyog you can use the Tab key to complete table or column namesor even functions, no matter what operating system you are using. SQL templates help with theproper syntax for the various SQL commands. First, right-click in the query building window.This will bring up a menu where you left-click Insert Templates to use a template. Figure 3-2shows the list of available templates with the CREATE TRIGGER statement template selected.At this point you just click the Insert button and SQLyog will create the template for you to fillin with your specific data.The second method of query writing is using the query builder to create the query. This isa more graphical method of query building where you drag the appropriate tables from theschema objects to a blank window. You can then do the common query actions of joiningtables, sorting, filtering, and grouping based on your chosen criteria. SQLyog will then build theSQL command for you to execute without actually having to type any SQL code.Figure 3-3 shows how the query builder looks with a simple query built from the sakiladatabase. 67Part I First Steps with MySQL FIGURE 3-2 FIGURE 3-3 68 Accessing MySQL 3After building the query you can copy the query over to the Query tab and then execute it withjust a couple of clicks.Database managementSQLyog has numerous features designed for database management. Among the tasks you canperform are: ■ Create new tables ■ Manage table indexes ■ Manage users ■ Synchronize databases ■ Back up and restore databases ■ Create triggers, views, events, and stored proceduresDatabase synchronizationOne of the best features of SQLyog is the database synchronization with its powertool. This toolallows you to synchronize two different databases by creating the corresponding SQL commandsneeded to match both the structure and data of the two database tables. There is a wizard thatwill guide through each step of the process. The process is simple — just select the databasesand tables to synchronize and SQLyog takes care of everything else. Resolving a data synchro-nization problem by hand is incredibly difficult, and SQLyog reduces the complexity to a fewsimple clicks.phpMyAdminphpMyAdmin is a free set of PHP scripts that are used to manage a MySQL server via a webinterface. Because phpMyAdmin is based on these PHP scripts it does require a web server torun. Though this might be seen as a drawback, it also means that you can access your MySQLservers from any computer that has a web browser. phpMyAdmin can be used to manage anentire MySQL server or a single database. You can find more information about phpMyAdmin, including how to download the program, at http://www.phpmyadmin.net/.We are not going to show how to install phpMyAdmin for your server setup because it variesdepending on your operating system. Typically, it is not very difficult. Once done with theinstallation of phpMyAdmin, access the system by simply going to the following URL in yourbrowser: http://yourserverip/phpmyadmin. You will need to replace yourserverip withthe hostname or IP address of your web server. You will be presented with a login screen whereyou will input your MySQL server login credentials. 69Part I First Steps with MySQL Figure 3-4 shows the opening screen for phpMyAdmin once you log in. FIGURE 3-4 You will use the left-hand frame in phpMyAdmin for navigation. Initially you will see the databases on the server displayed in this area. Tables will also be displayed under each database as they are created. In addition to the database navigation area on the left side, a number of options are available on the right-hand side of the split screen. Creating a database If you need to create a database there is a Create Database option on the main screen. You sim- ply enter the new database name and click the Create but ...

Tài liệu được xem nhiều: