Free web space - SETTING UP MYSQL AND PHPMYADMIN 4. The Export
SETTING UP MYSQL AND PHPMYADMIN 4. The Export section on the left of the screen lists all the tables in your database. Click Select All and leave the radio buttons on the default SQL. 5. If the database has never been transferred to the other server before, the only option that you need to set on the right side of the screen is the drop-down menu labeled SQL export compatibility. The setting depends on the version of MySQL on the other server (only the first two numbers, such as 3.23, 4.0, 4.1, or 5.0, are important): If the other server is running the same version of MySQL, choose NONE. If transferring between MySQL 4.1 and MySQL 5.0 (in either direction), choose NONE. If the other server is running MySQL 3.23, choose MYSQL323. If the other server is running MySQL 4.0, choose MYSQL40. 6. If the database has already been transferred on a previous occasion, select Add DROP TABLE in the Structure section. The existing contents of each table are dropped and are replaced with the data in the backup file. 7. Put a check mark in the box alongside Save as file at the bottom of the screen. The default setting in File name template is __DB__, which automatically gives the backup file the same name as your database. So, in this case, it will become phpsolutions.sql. If you add anything after the final double underscore, phpMyAdmin will add this to the name. For instance, you might want to indicate the date of the backup, so you could add 20070228 for a backup made on February 28, 2007. The file would then be named phpsolutions20070228.sql. Loading data from a backup file 1. Upload the SQL file to your remote server. (This isn t necessary if you are transferring data to a new installation of MySQL on your local computer.) 2. If a database of the same name doesn t already exist on the target server, create the database, but don t create any tables. 3. Launch the version of phpMyAdmin that is used by the target server and select the database that you plan to transfer the data to. Click the Import tab in the main frame. (On versions of phpMyAdmin earlier than 2.7.0, click the SQL tab instead.) 4. Use the Browse button to locate the SQL file and click Go. That s it! Looking ahead . . . Now that you have MySQL and phpMyAdmin installed, you re no doubt straining at the leash to get to work with your first database. Before you can do so, you need to set up at least one user account in MySQL and learn a little about how a database table is structured. That s what the next chapter is all about, but it won t be page after page of dull theory. By the end of the chapter, you will have built a simple database ready to start using with PHP and display dynamic data in your web pages. 283
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.