mysql scripts do not create databases [message #88] |
Tue, 20 June 2006 14:16 ![Go to next message Go to next message](/theme/default/images/down.png) |
David Lee
Messages: 44 Registered: June 2006
|
Member |
|
|
The mysql scripts in version 1.9.0 do not create the databases, so all the tables are created in whatever database is open when
they are run.
Easy enough to solve if you know, but it slowed me done a little!
Current problem is I can not log in, but still need to investigate more, and there is a separate thread on that subject,
which I will read and add to if needed.
|
|
|
Re: mysql scripts do not create databases [message #90 is a reply to message #88] |
Wed, 21 June 2006 04:51 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
All the scripts are created using the 'export' function within phpMyAdmin which, as you should know, does not include the code to create the database, just the tables. The database name is included as a comment at the start of each script. This means that each database must be created manually, then you must switch to the right database before running each of the scripts.
This is normal practice. If you are running on a shared web server the "create database" instruction needs to be separate as the database name may need to be prefixed with your account name, and phpMyAdmin takes care of this automatically.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: mysql scripts do not create databases [message #96 is a reply to message #94] |
Wed, 21 June 2006 16:31 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Unfortunately MySQL does not have a CREATE DATABASE IF NOT EXISTS ... so all I can do is insert the following lines at the top of each script:
CREATE DATABASE xxx ;
USE xxx ;
This really is such a trivial issue that most people do not seem to have a problem with, so trying to automate it or make it even simpler just for a few novices would not seem that important in the great scheme of things. Anyone who struggles to create a few databases is probably too much of a newbie to really appreciate the numerous features in a product such as Radicore.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|