Setting Up LAMP Getting Linux, Apache, MySQL, and PHP Working Together phần 8

Đối với ví dụ này, chúng tôi sẽ giả sử bạn có hai tên miền với DNS để trỏ đến địa chỉ IP của máy chủ của bạn. Nếu bạn không có DNS thiết lập hoặc bạn không sở hữu tên miền, bạn chỉ có thể chỉnh sửa tập tin host của hệ thống của bạn và lừa | 272 Chapter 9 MySQL Installation and Administration Simpo PDF Merge and Split Unregistered Version - http Here you can see your first table had been correctly inserted into the database. Now take a look at the details of the table by using a new command DESCRIBE DESCRIBE food You should then be given a result as follows - - - - - - - Field Type Null Key Default Extra - - - - - - food_id int 11 YES NULL food_name varchar 30 YES NULL expiration_date date YES NULL - - - - - - 3 rows in set sec Here formatted nicely with ASCII characters you can see each column name listed along with its type null key default and extra values. These values call all be changed through other commands and during the table creation. Because of the complex nature of the many possibilities of MySQL we will not be covering this in depth. Now that you have your table drop the table DROP TABLE food You can follow it up with this command DROP DATABASE test You will once again have a clean installation with only your mysql database installed. With these exercises completed you will be ready to move on to administering users within MySQL. Creating and Administering Users If you are logged in to the MySQL Client go ahead and quit so you can reenter by using a database from the command line. Because all privileges and user accounts are modified through the mysql database use the following command to launch the client usr local mysql bin mysql -u root mysql -p After you have entered your password you will once again be brought into the database but this time you will receive a slightly different message letting you know that MySQL has read the table information into memory for quicker queries. In this section we will show you several GRANT statements that allow for varying levels of access to be assigned to a user. The first one we will show you is the way to create a super user someone who has access to all commands for all databases and tables as well as the ability to create

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
30    277    2    26-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.