Avatar billede krohn Praktikant
05. november 2004 - 09:28 Der er 6 kommentarer og
1 løsning

Oprettelse af database i Mysql 4.1.7

Jeg har instaleret Mysql 4.1.7 på en maskine, den skal bruges til en mail server, men da jeg er på meget bar bund ang. Mysql, og da der er ændret noget i forhold til den manual jeg har til min mail server, så har jeg et lille problem med at få oprettet den database jeg skal bruge.
Hvordan opretter jeg en db  via den feature der hedder "Command Line Client"
Jeg lægger lige det fra manualen til en ældre version med, så i kan se hvad det er jeg skal have op og køre.


In our example we will assume that you decide to replace the embedded database with MySQL 4.0.12 or later, running on localhost, and accepting connections on the default port (3306). Open the mysql console: c:\mysql\bin\mysql --user=root mysql (Linux and Unix: adjust the path to your installation) In the console, type or copy&paste (to paste, simply right-click with the mouse in the console window) the following commands: create database desknow; grant all privileges on desknow.* to desknowserver@localhost identified by 'password'; grant all privileges on desknow.* to desknowserver@'%' identified by 'password'; \u desknow (we recommend choosing a password other than ‘password’) Note: MySQL has also a free and very good graphical console, available at http://www.mysql.com/products/mysqlcc/index.html . We recommend using the command line, however, since copy&paste is easier.

DeskNow - Administration and Configuration
Important: MySQL 4.0 does not support UNICODE. If you want to use a non-Latin character set for your data and emails, make sure to configure MySQL to support that characterset, or choose a different database engine. See the MySQL documentation for more information. According to the documentation provided with your DBMS, execute the database creation SQL script within the created database. The script will create all the tables and indexes necessary. In the mysql console (left at where you were at the previous step), type the following command: \. c:\Program Files\DeskNow\sql\desknow_mysql4.sql (Linux and Unix: the command is: \. /var/desknow/sql/desknow_mysql4.sql ) Note the first two characters are a backslash and a dot. Adjust the path for your installation. To exit the mysql console: \q 6.2.2 Installation of the JDBC drivers DeskNow needs appropriate JDBC drivers to connect to your database. Every major database system has JDBC drivers that can be used, and often there are many versions provided by different vendors. Free JDBC drivers for MySQL are available at http://www.mysql.com/products/connector-j/index.html JDBC drivers usually come as one or more .jar files. To install your driver into DeskNow, you just need to copy the .jar files into the “lib” directory of desknowdata. If you used the Windows installer to install DeskNow, this directory is usually C:\desknowdata\lib. If you used the Unix/Linux installation, this directory is /var/desknowdata/lib . Note: users upgrading from older versions may not have this directory. You can create it manually. Depending on the version of Connector-J that you downloaded, you should find a file called mysql-connector-java-3.0.8-stable-bin.jar or similar. Copy it to the lib directory of desknowdata
Avatar billede arne_v Ekspert
05. november 2004 - 10:03 #1
Avatar billede arne_v Ekspert
05. november 2004 - 10:04 #2
MySQL command line utility starter du med (på Windows):

\mysql\bin\mysql
Avatar billede krohn Praktikant
05. november 2004 - 10:22 #3
Jeg kigger på linket.
Jeg har fået started command line client
Avatar billede krohn Praktikant
05. november 2004 - 10:37 #4
Men når jeg skriver creat database xxxxxx i command line client så sker der ikke rigtigt noget, der kommer bare et -> i linjen under
Avatar billede buran Nybegynder
05. november 2004 - 10:50 #5
Du skal afslutte hver kommando med et ;
fx. vil:
"CREATE DATABASE xxxx;"
og
"CREATE
DATABASE
xxxx;"
giver samme resultat
Avatar billede krohn Praktikant
07. november 2004 - 17:45 #6
Ok, fik det til, lægger du et svar buran
Avatar billede buran Nybegynder
07. november 2004 - 20:17 #7
et svar...
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Computerworld tilbyder specialiserede kurser i database-management

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester