Hello. I'm helping a friend transfer hosts. Before we dropped the other host, I backed up the FTP and the SQL databases. His forum is running MyBB. How can I import the SQL databses which I backed up? The archive is a .zip. I went to phpyMyAdmin, but I got this error when trying to import the databases: SQL query: -- -- Database: `20x_5303509_user_db` -- -- -------------------------------------------------------- -- -- Table structure for table `mybb_adminlog` -- CREATE TABLE IF NOT EXISTS `mybb_adminlog` ( `uid` int( 10 ) unsigned NOT NULL DEFAULT '0', `ipaddress` varchar( 50 ) NOT NULL DEFAULT '', `dateline` bigint( 30 ) NOT NULL DEFAULT '0', `module` varchar( 50 ) NOT NULL DEFAULT '', `action` varchar( 50 ) NOT NULL DEFAULT '', `data` text NOT NULL , KEY `module` ( `module` , `action` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8; MySQL said: Documentation #1046 - No database selected Code (markup): What could be the problem?
You can easily restore or import MySQL data with mysql command itself. First you need to login to your system using ssh or putty (from Windows based system). For example: Type the following command at the shell prompt: $ ssh Now type following command to import sql data file: $ mysql -u username -p -h localhost data-base-name < data.sql If you have dedicated database server, replace localhost name with actual server name or IP address: $ mysql -u username -p -h 202.54.1.10 databasename < data.sql OR use hostname such as mysql.hosting.com $ mysql -u username -p -h mysql.hosting.com database-name < data.sql If you do not know the database name or database name is included in sql dump you can try out something as follows: $ mysql -u username -p -h 202.54.1.10 < data.sql Peddu hostcats.com
Hello, ---------- MySQL said: Documentation #1046 - No database selected -------- if you are restoring it via phpmyadmin , please make sure to create a db