MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 7th, 2004, 01:45 PM
Ruben Ruben is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Venezuela
Posts: 2 Ruben User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MySQL and DataDir: Server can not find databases

MySQL and DataDir
Server can not find databases

I've installed an Apache Server on WinXP home. It works fine.
Installed PHP and after a while got it working too, with the server,
But can not got working the MySQL connetion. I'll explain:
Put an application, wich uses php and mysql (dadabik) under c:\xxx\apache\html\dadabik and works only if the databases are located where is specified on the datadir directive (mysql\data\)
Others like php-nuke output a db related error and do not run

actual configuration:
basedir=C:/mysql
datadir=C:/mysql/data

Now the questions:

1-should I change the datadir directive to c:\xxx\apachtml\dadabik ?
in that case should I move the mysql database too?
2-I intent to use another systems like php-nuke and I don't know where it have (or will generate) their databases. ¿?

3- Even solving the former questions I won't be able to serve all of them without changing my.ini conf file and restarting mysql server :(

The big question: - There is no way to give the mysql server a list of directories, or one under wich I will be working?
or should I put all the databases together in C:/mysql/data or similar?
Thanks for any sugestion.

Reply With Quote
  #2  
Old January 7th, 2004, 10:28 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Have you used the MySQL console to create the databases and tables with SQL?

try this...
in DOS, type C:\mysql\bin\mysql.exe
then type show databases;

It sounds to me you haven't reached this step in your set-up...
to create a database, type CREATE DATABASE dbname

if its php-nuke you're trying to set up, i believe there's a file with the SQL code inside it...

I hope i understood your situation properly, otherwise please clarify...

Reply With Quote
  #3  
Old January 8th, 2004, 10:41 AM
Ruben Ruben is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Venezuela
Posts: 2 Ruben User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you for your answer.

Let's be more explicit:
"DaDaBIK is a free PHP application that allows you to easily create a highly customizable Web form interface for a MySQL database in order to search, insert, update and delete records" URL It expect to have a database already created (I did it)
I stored (the app.) on "localhost"/dadabik. Ran it and it worked, but look up for the testing database (and create the control database) on \mysql\data\ folder.
My question is: How can I get MySQL serving databases in diferent folders (if is possible) for different applicatios runing on other folders? Or should I put all the databases in the same folder as directed on datadir=C:/mysql/data or wherever?
In the last case: If I decide to change the default database folder to something like "localhost"/mydatabases/, should anything else be changed, beside the "datadir=" directive? for example, the control database installed by mysql should be moved to the new folder?

Similar thing about php-nuke. I belive it will create the needed db's on first start up, but expect MySQL be active on a specific folder. As I said, my actual instalation only works on the default folder (/mysql/data). I guess the same answer for the former topic will help on this.

Hope could be clear enough, Ruben

Reply With Quote
  #4  
Old January 8th, 2004, 11:54 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Oh, I think I understand your question now...

Mysql will handle the placement of the physical database files... I strongly advise you not to put your Mysql data folder in your web domain (localhost/mydatabases)... Personally, I would leave it in C:/mysql/data

I believe Mysql only requires a data folder, and it places all the database files inside that folder... You can create copies somewhere else as a backup, but the production versions will stay in the data folder (/mysql/data)

I don't think PHP nuke cares where the folder is, since it will add the databases/tables/data through the actual remote database system (the mysql daemon)... I assume DaDaBIK operates the same way...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > MySQL and DataDir: Server can not find databases


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT