Ik weet niet of dit in het juiste forum zit, wel zit ik met een paar vragen:
Ik heb veel ervaring met MsAccess-dbs, maar ik moet een trapje "hoger". Ik wil beginnen met een MySQL server om daar mijn frontends aan te hangen en daar kom ik niet helemaal uit.
MySQL-server draait, phpmyadmin werkt, MySQLWorkbench ook. Wat ik niet aan de praat krijg zijn relaties.
Ik heb deze guide gevolgd:
http://wiki.phpmyadmin.net/pma/pmadb
De tabellen voor pmadb zijn aangemaakt in een database "phpmyadmin", w.o. een tabel "pma_relation"
De config (.../phpmyadmin/config.inc.php) verwijst naar:
Ik heb - tijdelijk? - hier de rootuser + password neergezet (niet zzzz), maar dan stopt het.
Onderaan phpmyadmin staat een melding:
$cfg['Servers'][$i]['pmadb'] ... Niet Goed [ Documentatie ]
$cfg['Servers'][$i]['relation'] ... Niet Goed [ Documentatie ]
Basis relatie opties: Uitgeschakeld
etcetc voor alle andere tabellen uit deze pma-db.
Deze melding lijkt aan te geven dat de config niet goed staat ingesteld, aangezien pmadb en relation niet de db/tabellen zijn die ik heb aangemaakt? Maar mijn config verwijst volgens mij niet "pmadb" maar naar "phpmyadmin", en naar "pma_relaties"
Als ik op Documentatie klik dan kom ik op
Ik krijg deze foutmelding bij het forward engineeren:
De tabel relaties is aangemaakt, de tabel inschrijvingen niet.
Ik heb de relatie alléén gedefinieerd als een FK naar tabel relaties, vanuit de specs van de tabel inschrijvingen. In het EER-model lijkt dat er goed uit te zien, maar vanuit de tabel relaties is niets van de relatie te zien....is dat goed?
Dus twee vragen:
- waarom gaat mijn configuratie niet goed
- maak ik de relatie op de juiste manier aan?
Ik heb veel ervaring met MsAccess-dbs, maar ik moet een trapje "hoger". Ik wil beginnen met een MySQL server om daar mijn frontends aan te hangen en daar kom ik niet helemaal uit.
MySQL-server draait, phpmyadmin werkt, MySQLWorkbench ook. Wat ik niet aan de praat krijg zijn relaties.
Ik heb deze guide gevolgd:
http://wiki.phpmyadmin.net/pma/pmadb
De tabellen voor pmadb zijn aangemaakt in een database "phpmyadmin", w.o. een tabel "pma_relation"
De config (.../phpmyadmin/config.inc.php) verwijst naar:
code:
1
2
3
4
5
6
| /* User for advanced features */ // $cfg['Servers'][$i]['controluser'] = 'root'; // $cfg['Servers'][$i]['controlpass'] = 'zzzzzz'; /* Advanced phpMyAdmin features */ // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; // $cfg['Servers'][$i]['relation'] = 'pma_relation'; |
Ik heb - tijdelijk? - hier de rootuser + password neergezet (niet zzzz), maar dan stopt het.
Onderaan phpmyadmin staat een melding:
Als ik klik staat er:Extra opties om met tabellen te werken, die gelinkt zijn, zijn uitgeschakeld. Om te weten te komen waarom klik hier
$cfg['Servers'][$i]['pmadb'] ... Niet Goed [ Documentatie ]
$cfg['Servers'][$i]['relation'] ... Niet Goed [ Documentatie ]
Basis relatie opties: Uitgeschakeld
etcetc voor alle andere tabellen uit deze pma-db.
Deze melding lijkt aan te geven dat de config niet goed staat ingesteld, aangezien pmadb en relation niet de db/tabellen zijn die ik heb aangemaakt? Maar mijn config verwijst volgens mij niet "pmadb" maar naar "phpmyadmin", en naar "pma_relaties"
Als ik op Documentatie klik dan kom ik op
Als ik een EER-model maak met Workbench voor 2 simpele tabellen met een relatie dan werkt het niet..$cfg['Servers'][$i]['pmadb'] string
The name of the database containing the linked-tables infrastructure.
See the Linked-tables infrastructure section in this document to see the benefits of this infrastructure, and for a quick way of creating this database and the needed tables.
If you are the only user of this phpMyAdmin installation, you can use your current database to store those special tables; in this case, just put your current database name in $cfg['Servers'][$i]['pmadb']. For a multi-user installation, set this parameter to the name of your central database containing the linked-tables infrastructure.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; CREATE SCHEMA IF NOT EXISTS `Lexlumen` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `Lexlumen` ; -- ----------------------------------------------------- -- Table `Lexlumen`.`relaties` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `Lexlumen`.`relaties` ( `idrelaties` INT UNSIGNED NOT NULL AUTO_INCREMENT , `naam` TEXT NULL , PRIMARY KEY (`idrelaties`) ) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `Lexlumen`.`inschrijvingen` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `Lexlumen`.`inschrijvingen` ( `idinschrijvingen` INT UNSIGNED NOT NULL AUTO_INCREMENT , `inschriving` VARCHAR(45) NULL , `relatieID` INT NULL , PRIMARY KEY (`idinschrijvingen`) , INDEX `relatieID` () , CONSTRAINT `relatieID` FOREIGN KEY () REFERENCES `Lexlumen`.`relaties` () ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; |
Ik krijg deze foutmelding bij het forward engineeren:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| Executing SQL script in server ERROR: Error 1064: 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 ') , CONSTRAINT `relatieID` FOREIGN KEY () REFERENCES `Lexlumen`.`relat' at line 9 -- ----------------------------------------------------- -- Table `Lexlumen`.`inschrijvingen` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `Lexlumen`.`inschrijvingen` ( `idinschrijvingen` INT UNSIGNED NOT NULL AUTO_INCREMENT , `inschriving` VARCHAR(45) NULL , `relatieID` INT NULL , PRIMARY KEY (`idinschrijvingen`) , INDEX `relatieID` () , CONSTRAINT `relatieID` FOREIGN KEY () REFERENCES `Lexlumen`.`relaties` () ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB SQL script execution finished: statements: 6 succeeded, 1 failed |
De tabel relaties is aangemaakt, de tabel inschrijvingen niet.
Ik heb de relatie alléén gedefinieerd als een FK naar tabel relaties, vanuit de specs van de tabel inschrijvingen. In het EER-model lijkt dat er goed uit te zien, maar vanuit de tabel relaties is niets van de relatie te zien....is dat goed?
Dus twee vragen:
- waarom gaat mijn configuratie niet goed
- maak ik de relatie op de juiste manier aan?