History: Import database
Source of version: 8 (current)
Copy to clipboard
! Import database ^''This is part of the ((Basic Docs Project)). It ((needs review)), and ((screenshot))s need to be replaced by their English equivalents''^. There are two easy ways to proceed: # Through web interface (__Phpmyadmin__), o # Through command at a terminal screen (command mysql) !! A. Through web interface (__Phpmyadmin__) Go to your Phpmyadmin installation. ::||{img src=http://www.moviments.net/cursos/show_image.php?id=27 width=700 }||:: Select your database name, from the drop down list on the left column in the previous screen. ::||{img src=http://www.moviments.net/cursos/show_image.php?id=28 width=700 }||:: You have to go to the phpmyadmin tab which says "__SQL__", (versions 2.6.x of Phpmyadmin, like the one in the ((tw:TikiLiveCD)), or tab "__Import__", included in version 2.8.x of Phpmyadmin, for instance). {CENTER()}||{img src="img/wiki_up/slaxtiki_instal_22.png" width=700 desc="Export tab, in Phpmyadmin version 2.8.x"}||{CENTER} !! B. Through command at a terminal screen (command mysql) ::||{img src=http://www.moviments.net/cursos/show_image.php?id=77 }||:: ::||{img src=http://www.moviments.net/cursos/show_image.php?id=78 }||:: Write a command like {CODE()} mysql -uuser -ppass tiki19 < tiki19_backup_yymmdd.sql {CODE} In your case, change in the example above: * ''user'' for your username at the mysql server * ''pass'' for the password for that username at the mysql server * ''tiki19'' for your database name, and * ''yymmdd'' for the two digits of year, month and day, respectively, for instance, to have your backups easily sorted by name and date of creation also. If you had exported your database without the option to delete the tables (__Drop tables__, from the ((Backup)) instructions through Phpmyadmin) before attempting to restore them from the database backup, then you will have to empty the database tables first. (through phpmyadmin, for instance). And in case that you have troubles with the character set used to import the database to mysql, you can specify the character set in which your sql database backup is encoded. In order to do so, you can add the parameter __--default-character-set=__~~red:code~~ (and as ~~red:code~~, you can set for instance ~~red:utf8~~ or ~~red:iso-8859-1~~) As an example, in order to set the character set to utf8, you would have to write something like: {CODE()} mysql -uuser -ppass --default-character-set=utf8 tiki19 < tiki19_backup_yymmdd.sql {CODE} !! C. Using MySqlDumper or HeidiSql Both tools can import a sql file. See there homepages for details and examples. * [http://www.mysqldumper.net/] * [http://www.heidisql.com/] * [http://www.ozerov.de/bigdump.php|BigDump] (Staggered import of large and very large MySQL Dumps even through the web-servers with hard runtime limit and those in safe mode) * [http://www.adminer.org/|Adminer] (formerly phpMinAdmin) is a full-featured MySQL management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. -=Related pages=- * ((Backup)) * ((Import-Export)) -=Alias=- (alias(Restore Database))