|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
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... |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
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... |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > MySQL and DataDir: Server can not find databases |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|