Submitted by christefano on Fri, 12/04/2009 - 14:08 Pro Licensee
Can a MySQL database created outside of Virtualmin be associated with a virtual server that has been created in Virtualmin?
Status:
Closed (fixed)
Can a MySQL database created outside of Virtualmin be associated with a virtual server that has been created in Virtualmin?
Comments
Submitted by christefano on Fri, 12/04/2009 - 14:13 Pro Licensee Comment #1
Nevermind, I found it:
Submitted by JamieCameron on Fri, 12/04/2009 - 15:04 Comment #2
Yes, that will do it.
Submitted by Issues on Sat, 12/19/2009 - 21:20 Comment #3
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by mklee on Sat, 01/16/2010 - 07:53 Comment #4
I'm also trying to import a database using your method above.
However, when I click on import database, it states "This form allows you to bring existing manually created databases on the system under the ownership of this virtual server. However, there are no un-owned databases on the system."
I don't have an option to import a database? Any ideas?
Submitted by JamieCameron on Sat, 01/16/2010 - 12:56 Comment #5
mklee - that message will appear if all your MySQL and PostgreSQL databases are already owned by other domains. Or if the database you want to import is one of those used by MySQL internally, like
mysql
orinformation_schema
.Submitted by mklee on Sat, 01/23/2010 - 10:39 Comment #6
Hi Jamie,
Thanks for your reply.
I'm been pulling my hair out for the last week trying to get my site up - it's a job board. My site is now hosted by Daily, and not by my last hosting company.
I seem to have a information_schema database. Can you please tell me (in simple terms please!) where I go from here?
help!
Regards, Quentin.
Submitted by JamieCameron on Sat, 01/23/2010 - 16:06 Comment #7
There may be some confusion about what Virtualmin means by "importing".
If you go to Webmin -> Servers -> MySQL Databases, does this database appear on the list?
If not, I am guessing that you have an SQL file which is a database dump that you want to import. If so, the steps to follow are :
Select the domain from the left menu, and go to Edit Databases, click on the domain's existing database, then the Manage Database button.
Click the Execute SQL button.
Go to the "Run SQL from file" tab, select the file you want to import, then click "Execute".
Submitted by mklee on Thu, 01/28/2010 - 11:08 Comment #8
Thanks for the reply and instructions.
However, it comes up with this error:
Output from uploaded SQL commands ..
ERROR 1008 (HY000) at line 12: Can't drop database 'mydomains_'; database doesn't exist
Any ideas?
Regards, Quentin
Submitted by mklee on Thu, 01/28/2010 - 11:12 Comment #9
Sorry, I should mention that after clicking through: Webmin -> Servers -> MySQL Databases - "mysql" DOES appear on the list with 17 tables.
Regards, Quentin.
Submitted by JamieCameron on Thu, 01/28/2010 - 11:38 Comment #10
Try removing any statements like "drop database" or "create database" from the SQL file, then re-running it.
Submitted by mklee on Fri, 01/29/2010 - 09:34 Comment #11
I'm afraid it comes up with this error:
ERROR 1064 (42000) at line 12: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
mydomains_
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1=================================
This is the original sql file statement
-- phpMyAdmin SQL Dump
-- version 2.8.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jan 16, 2010 at 12:36 PM
-- Server version: 5.0.22
-- PHP Version: 5.2.6
--
-- Database: `mydomains_`
--
DROP DATABASE `mydomains_`;
CREATE DATABASE `mydomains_` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `mydomains_`;
And this is what it look like when I remover "drop and create database"
-- phpMyAdmin SQL Dump
-- version 2.8.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jan 16, 2010 at 12:36 PM
-- Server version: 5.0.22
-- PHP Version: 5.2.6
--
-- Database: `mydomains_`
-- `mydomains_`;
`mydomains_` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `mydomains_`;
Any ideas at all?
Submitted by JamieCameron on Fri, 01/29/2010 - 12:06 Comment #12
Sorry, what I meant was that you should remove the whole line :
DROP DATABASE \`mydomains_\`;
CREATE DATABASE \`mydomains_\` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE \`mydomains_\`;
Submitted by mklee on Sun, 01/31/2010 - 10:47 Comment #13
I executed this sql statement:
-- phpMyAdmin SQL Dump -- version 2.8.2.4 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Jan 16, 2010 at 12:36 PM -- Server version: 5.0.22
-- PHP Version: 5.2.6
-- Database:
mydomains_
Came up with "No data returned" ??
Submitted by JamieCameron on Sun, 01/31/2010 - 11:34 Comment #14
Would it be possible for you to email me this SQL file at jcameron@virtualmin.com ?