tailieunhanh - Tạo mạng xã hội với PHP - part 41
Deployment, Security, and Maintenance From here, we can select which tables we wish to download, and have the option of either exporting the database as SQL, or as a download containing SQL, as shown in the following screenshot: Importing our local database to the hosting account With a copy of our local development database exported, we can import it into our hosting account using the Import tab on the server's phpMyAdmin, where we simply upload the SQL file (if we exported as text, we would use the SQL tab to paste the SQL into it and import the database). [ 382 ] Download from Chapter. | Deployment Security and Maintenance From here we can select which tables we wish to download and have the option of either exporting the database as SQL or as a download containing SQL as shown in the following screenshot Importing our local database to the hosting account With a copy of our local development database exported we can import it into our hosting account using the Import tab on the server s phpMyAdmin where we simply upload the SQL file if we exported as text we would use the SQL tab to paste the SQL into it and import the database . ---------------------------- 382 ----------------------- Download from Chapter 12 In most cases there is a 2 MB limit on file uploads. This can cause problems when importing a large active site however we are only importing our skeleton database so this shouldn t be a problem. For importing and exporting large databases you should use SSH as discussed later in this chapter. We now have our database set up and working on the production server Changing some of our database records Some of our database records might have been specific to our local development version of Dino Space. Most of these should be contained in the settings table such as the siteurl setting which at present points to our local installation. We will need to update this record to reflect our live site. 383 Download from Deployment Security and Maintenance Changing our database configuration options As the production database is on the production server we will also need to update our file to point to the database on the server as opposed to the database on our local machine. The details required for this file were established when we created the database and database user on the server earlier in this chapter. php configs array configs db_host_sn localhost configs db_user_sn dinospacenetwork configs db_pass_sn dinospacenetwork configs db_name_sn Ac932w4dheJDbFfd Uploading the files With the configuration file .
đang nạp các trang xem trước