Wer hilft MySQL intsallieren?

QuickSilverEX

Aktives Mitglied
Thread Starter
Dabei seit
13.06.2004
Beiträge
792
Reaktionspunkte
27
Hallo,

ich muss in Kürze einen Server aufsetzen, der unteranderem eine MySQL Datenbak beheimatet und für die Clients im Netzwerk zugänglich machen soll.
Augrund der Software auf den Clients, muss ich MySQL 3.23 installieren.
Diese habe ich nur noch hier als binary gefunden:

http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-3.23/mysql-3.23.58-apple-darwin6.4-powerpc.tar.gz

Wenn ich nun der Anleitung folge, soll ich bestimmte Begriffe in das Terminal tippen. Leider passiert gar nichts, außer ein "Command not found" oder so.

Ich habe leider Null Ahnung, was ich machen muss,
vielleicht ist jemand so nett und erklärt mir das ganze ein wenig?

Viele Dank
 
Wo installierst du das? lokal?
 
eahm, ja, also direkt auf dem Computer, den ich als Server nutzen möchte. Das ganze soll ein kleines Firmennetzwerk werden

MAMP geht leider nicht, weil ich MySQL 3.23 nutzen muss.
 
"ich muss in Kürze einen Server aufsetzen"
"Firmennetzwerk"
"Ich habe leider Null Ahnung"

Ehrlicher Rat: Lass es bleiben und frage jemanden der sich damit auskennt.
Zumindest ansatzweise sollte Wissen vorhandensein, bevor man sich an so etwas heranwagt. Ein Firmennetzwerk ist kein Heimbastelplatz.
 
Nun ja, wenn da "Command not found" auftaucht, ist es vielleicht das falsche Paket für das betreffende Betriebssystem.
 
"ich muss in Kürze einen Server aufsetzen"
"Firmennetzwerk"
"Ich habe leider Null Ahnung"

Ehrlicher Rat: Lass es bleiben und frage jemanden der sich damit auskennt.
Zumindest ansatzweise sollte Wissen vorhandensein, bevor man sich an so etwas heranwagt. Ein Firmennetzwerk ist kein Heimbastelplatz.

Null Ahnung bezog sich auf MySQL und die Datenbank (ok; und das Terminal). Ansonsten bin ich fit.
Trotzdem hast du im Grunde genommen recht. Ich dachte nur das wäre eine gute Gelegenheit MySQL zu erlernen. Falls, sollte mal etwas nicht mehr funktionieren, ich auch selber reparieren kann.

Firmennetzwerk klingt gleich so hochtrabend, es ist zum Glück deutlich simpler. Es geht lediglich darum, eine MySQL Datenbank für die Clients erreichbar zu machen.
 
das klingt doch in der Tat nach der passenden Gelegenheit :)

QuickSilverEx schrieb:
Wenn ich nun der Anleitung folge, soll ich bestimmte Begriffe in das Terminal tippen. Leider passiert gar nichts, außer ein "Command not found" oder so.

Nun das klingt für mich danach das mysql-eigene Befehle nicht gefunden werden!? Zumindest sollten die Standard-terminalbefehle funktionieren!?

Jedes UNIX sucht in einem sog. PATH nach einer Liste von Verzeichnissen die es abklappert um vom Anwender eingegebene Befehle darin zu finden und sie ausführen zu können. Den aktuellen PATH kann man sich mittels

echo $PATH

im Terminal anzeigen lassen. Nat. variiert der je nach installierter Software und vor allem nach dem Ort wo man diese hininstalliert ( das ist nämlich im Grunde bei einem UNIX beliebig). Liegen Programme wie mysql, mysqladmin,... nicht im PATH, so muß beim Start im Terminal der vollständige Pfad zu ihnen angegeben werden:

/pfad/zu/mysql/bin/mysql -uroot -p

nat. wird das auf die Dauer lästig und Du kannst den PATH passend erweitern ( hier um Dein /pfad/zu/mysql/bin-Verzeichnis) wie das geht ( und viele andere Terminal-Tipps auch) findest Du im Mac OS UNIX-Unterforum hier im Forum.
 
Hi Wegus,

schön, dass es doch jemand für eine gute Idee hält, es selber zu machen =)
Das mit dem Pfad könnte der entscheidende Tipp sein! Habe mir das Binary-Paket auf den desktop gelegt und dann im Terminal die Befehle aus der Readme probiert. Wenn man unbedingt vorher den Pfad angeben muss, ist es klar warum es nicht funktioniert hat.

Was ich schon gelernt habe ist, dass man mit "CD" die directory wechseln kann. Vielleicht muss ich mich erstmal auf den Desktop wählen?

Werde heute abend alles probieren, wie du es geschrieben hast und mich dann wieder melden.
 
Wenn du mit dem Terminal arbeitest, kannst du auch "cd " eingeben und per drag & drop die Datei oder den Folder draufziehen, dann wird die Adresse im Terminal eingefügt.
 
@QuickSilverEx:

Im Grunde ist das genau der richtige Zeitpunkt und der richtige "unwichtige" Job um das alles mal auszuprobieren. Allerdings wirst Du nicht umhinkommen gleichzeitig den Umgang mit der Bash-Shell zu erlernen. Das heißt all die gängigen Befehle und die Funktionsweise einer solchen Shell.

Die primäre Frage wird eben sein wohin Dein MySQL installiert worden ist ( das wird kaum der Desktop sein). Oftmals ist es /usr/local/mysql oder Ähnliches!


Viel Spaß beim lernen!
 
achso, also wirklich installiert ist es noch gar nicht, da es keinen installer gibt! Hab den Ordnereinfach auf dem Desktop liegen. Den Rest soll man über das Terminal regeln. Werde es heute abend testen
 
Ich nehme an, du hast dir INSTALL-BINARY oder Kapitel 2.2.11 "Installing a MySQL Binary Distribution" durchgelesen - sag doch einfach mal bei welchem Befehl es hapert und auf welchem System du unterwegs bist.
 
Ich habe mir das .tar file runtergeladen und entpackt. Den dann erschienen Ordner, habe ich in das Verzeichnis Macintosh HD-->Benutzer-->QuickSilver-->MySQL (neu angelegter Ordner) verschoben.

Nun habe ich das Terminal gestartet und mich via CD in den entpackten MySQL3.28 Ordner gewechselt. Dann wollte ich die Befehle "groupadd mysql" und "useradd -g mysql mysql" eingeben, jedoch kommt immer "Command not found". Die alternativen Schreibweisen wie adduser habe ich auch schon probiert

Die Install-Binary gibt folgendes vor:
Installing a MySQL Binary Distribution
--------------------------------------

See also *Note Windows binary installation::, *Note Linux-RPM::, and
*Note Building clients::.

You need the following tools to install a MySQL binary distribution:

* GNU `gunzip' to uncompress the distribution.

* A reasonable `tar' to unpack the distribution. GNU `tar' is known
to work. Sun `tar' is known to have problems.

An alternative installation method under Linux is to use RPM-based (RPM
Package Manager) distributions. *Note Linux-RPM::.

If you run into problems, *please always use `mysqlbug'* when posting
questions to <mysql@lists.mysql.com>. Even if the problem isn't a bug,
`mysqlbug' gathers system information that will help others solve your
problem. By not using `mysqlbug', you lessen the likelihood of getting
a solution to your problem. You will find `mysqlbug' in the `bin'
directory after you unpack the distribution. *Note Bug reports::.

The basic commands you must execute to install and use a MySQL binary
distribution are:

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/safe_mysqld --user=mysql &
or
shell> bin/mysqld_safe --user=mysql &
if you are running MySQL 4.x

You can add new users using the `bin/mysql_setpermission' script if you
install the `DBI' and `DBD-mysql' Perl modules.

A more detailed description follows.

To install a binary distribution, follow these steps, then proceed to
*Note Post-installation::, for post-installation setup and testing:

1. Pick the directory under which you want to unpack the
distribution, and move into it. In the following example, we
unpack the distribution under `/usr/local' and create a directory
`/usr/local/mysql' into which MySQL is installed. (The following
instructions, therefore, assume you have permission to create
files in `/usr/local'. If that directory is protected, you will
need to perform the installation as `root'.)

2. Obtain a distribution file from one of the sites listed in *Note
Getting MySQL: Getting MySQL.

MySQL binary distributions are provided as compressed `tar'
archives and have names like `mysql-VERSION-OS.tar.gz', where
`VERSION' is a number (for example, `3.21.15'), and `OS' indicates
the type of operating system for which the distribution is intended
(for example, `pc-linux-gnu-i586').

3. If you see a binary distribution marked with the `-max' suffix,
this means that the binary has support for transaction-safe tables
and other features. *Note `mysqld-max': mysqld-max. Note that all
binaries are built from the same MySQL source distribution.

4. Add a user and group for `mysqld' to run as:

shell> groupadd mysql
shell> useradd -g mysql mysql

These commands add the `mysql' group and the `mysql' user. The
syntax for `useradd' and `groupadd' may differ slightly on
different versions of Unix. They may also be called `adduser' and
`addgroup'. You may wish to call the user and group something
else instead of `mysql'.

5. Change into the intended installation directory:

shell> cd /usr/local

6. Unpack the distribution and create the installation directory:

shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql

The first command creates a directory named `mysql-VERSION-OS'.
The second command makes a symbolic link to that directory. This
lets you refer more easily to the installation directory as
`/usr/local/mysql'.

7. Change into the installation directory:

shell> cd mysql

You will find several files and subdirectories in the `mysql'
directory. The most important for installation purposes are the
`bin' and `scripts' subdirectories.

`bin'
This directory contains client programs and the server You
should add the full pathname of this directory to your `PATH'
environment variable so that your shell finds the MySQL
programs properly. *Note Environment variables::.

`scripts'
This directory contains the `mysql_install_db' script used to
initialise the `mysql' database containing the grant tables
that store the server access permissions.

8. If you would like to use `mysqlaccess' and have the MySQL
distribution in some non-standard place, you must change the
location where `mysqlaccess' expects to find the `mysql' client.
Edit the `bin/mysqlaccess' script at approximately line 18.
Search for a line that looks like this:

$MYSQL = '/usr/local/bin/mysql'; # path to mysql executable

Change the path to reflect the location where `mysql' actually is
stored on your system. If you do not do this, you will get a
`Broken pipe' error when you run `mysqlaccess'.

9. Create the MySQL grant tables (necessary only if you haven't
installed MySQL before):
shell> scripts/mysql_install_db

Note that MySQL versions older than Version 3.22.10 started the
MySQL server when you run `mysql_install_db'. This is no longer
true.

10. Change ownership of binaries to `root' and ownership of the data
directory to the user that you will run `mysqld' as:

shell> chown -R root /usr/local/mysql/.
shell> chown -R mysql /usr/local/mysql/data
shell> chgrp -R mysql /usr/local/mysql/.

The first command changes the `owner' attribute of the files to the
`root' user, the second one changes the `owner' attribute of the
data directory to the `mysql' user, and the third one changes the
`group' attribute to the `mysql' group.

11. If you want to install support for the Perl `DBI'/`DBD' interface,
see *Note Perl support::.

12. If you would like MySQL to start automatically when you boot your
machine, you can copy `support-files/mysql.server' to the location
where your system has its startup files. More information can be
found in the `support-files/mysql.server' script itself and in
*Note Automatic start::.


After everything has been unpacked and installed, you should initialise
and test your distribution.

You can start the MySQL server with the following command:

shell> bin/safe_mysqld --user=mysql &

Now proceed to *Note `safe_mysqld': safe_mysqld, and *Note
Post-installation::.
 
öhm durch veröffentlichen ganzer READMEs kommen wir hier nun nicht weiter :( das nimmt nur Platz weg!

zunächst: DU hast da eine Doku für RPM und das ist für LINUX und nicht auf Mac OS lauffähig

(1) groupadd und useradd dürfen längst nicht alle Benutzer ausführen! Dazu muß man IMHO root sein! Jedenfalls tut die Shell bei mangelnden Berechtigungen hier so als kenne sie den Befehl nicht. Das ist eine etwas antiquierte Sicherheitsmaßnahme :)

(2) Beide Befehle sind auf Mac OS anders zu verwenden ( bei 10.4 wieder etwas anders als bei 10.5!).

(3) OS Leopard bringt glaub ich schon einen User mysql mit. Du kannst aber auch einen ganz normalen User in den Systemeinstellungen anlegen. Das funktioniert dann per GUI und geht in jedem Fall!
 
Ich habe mir das .tar file runtergeladen und entpackt. Den dann erschienen Ordner, habe ich in das Verzeichnis Macintosh HD-->Benutzer-->QuickSilver-->MySQL (neu angelegter Ordner) verschoben.
Das Auspacken ist gar nicht vorgesehen. Verschiebe das ursprünliche Paket doch mal mit
Code:
mv /Users/QuickSilver/... pfad-zum-paket/mysql-3.23.58-apple-darwin6.4-powerpc.tar.gz /usr/local/

Dann wollte ich die Befehle "groupadd mysql" und "useradd -g mysql mysql" eingeben, jedoch kommt immer "Command not found".
Ich weiß nicht mehr, welche Befehle ohne Developer-Tools (XCode) funktionieren, und deshalb auch die Frage nach dem System; Tiger? Wie das ganze unter Leopard laufen könnte, weiß ich jetzt auch nicht, da es dann den User mysql nicht mehr gibt, der hieße dann _mysql (group wheel). sudo /usr/local/mysql/bin/mysqld_safe --user=mysql & als Start-Befehl geht dann also nicht mehr, und ob
Code:
sudo chown -R mysql:wheel /usr/local/mysql/data
dann die Lösung ist? Könnte ja hier (falls Leopard) eine Expertendiskussion auslösen.http://209.85.129.104/search?q=cach...l+_mysql+group+mysql&hl=de&ct=clnk&cd=2&gl=de. Der User mysql muss dann allerdings existieren.

Ansonsten (vor Leopard) kann mann den user auch anders anlegen - entweder über den Netinfo Manager oder einfach in Systemeinstellungen neuen user mysql anlegen (passwort: mysql) - erinnere mich jedenfalls, dass es früher so gemacht wurde.

Dann ginge es mit
Code:
cd /usr/local
weiter.
gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - Wenn du das Paket schon hierhin geschoben hast, ersetzen durch:
Code:
tar xfz mysql-3.23.58-apple-darwin6.4-powerpc.tar.gz
Hats geklappt? dann ist das paket zum Folder mysql-3.23.58-apple-darwin6.4-powerpc geworden.
Mit
Code:
ln -s mysql-3.23.58-apple-darwin6.4-powerpc mysql
wird der Verzeichnisname mit dem Alias (symbolischer Link) mysql verknüpft und vereinfacht.

Probiers erstmal soweit, und sag wo der nächste Hänger auftaucht.
 
Zuletzt bearbeitet:
uijuijui... ne ganze Menge Infos.
Vielen Dank schonmal für die Mühe.
Werde mich heute abend nochmals dran setzen und mich wieder melden
 
@UDH5
... das ist wirklich unglaublich. es scheitert schon bei der ersten Kommandozeile. Es wird nix verschoben, oder sonst was.
Fehler: -bash: cd: mv: No such file or directory

So langsam glaube ich, dass ich das doch eine Profi überlassen muss.
Eigentlich bin ich ziemlich fit, was OS X angeht, nur vom Terminal hab ich absolut null Ahnung. Wenn ich wenigstens ansatzweise wüsset, was das Problem ist.
 
es ist relativ normal das die ersten Schritte in der Shell entnervend sind! Da braucht es eine gute Portion Durchhaltevermögen. Man wird aber später mit einem sehr universellen und mächtigen Tool-Set belohnt.

Da es /usr/local mit Sicherheit gibt, muß Dein Quellpfad falsch sein. Versuch ihn mal Etappenweise mit

ls /User
ls /User/Quicksilver
....

zu prüfen. Du wirst schon merken ab wo es nicht mehr paßt!
 
wenn ich das gepackte File mit dem Terminal verschiebe, soll es ja zu dem Ort Local. Kann ich es dann nicht einfach per drag and drop in den Ort Local legen? local ist doch der Ort, direkt hinter QuickSilver?

im Terminal steht momentan QuickSilver-Computer:(dieses Wellzeichen)QuickSilver$

Wenn ich nun ls eintippe, zeigt er mir die Ordner Music, Documents etc..is ja logisch
 
Zurück
Oben Unten