mysql & Redhat 9.0

This is a discussion about mysql & Redhat 9.0 in the Everything Linux category; I installed redhat 9. 0 onto a machine last night, I also selected to install apache (which is running fine). But how do I install+setup mysql. If I need to download a package, which package do I need and how do I go about it? Thanks Shaun.

Everything Linux 1800 This topic was started by , . Last reply by ,


data/avatar/default/avatar38.webp

1 Posts
Location -
Joined 2003-11-25
I installed redhat 9.0 onto a machine last night, I also selected to install apache (which is running fine).
 
But how do I install+setup mysql.
 
If I need to download a package, which package do I need and how do I go about it?
 
Thanks
 
Shaun

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Nov 25
Created
Nov 26
Last Response
0
Likes
3 minutes
Read Time
User User
Users

Responses to this topic


data/avatar/default/avatar32.webp

7 Posts
Location -
Joined 2003-11-25
I just did this two days ago. I've put MySQL on four machines, three of them Linux machines (including one laptop) and one windows XP machine. You get MySQL here:
 
http://www.mysql.com/downloads/mysql-4.0.html
 
I picked up the latest production release which is 4.0.16 at 14.6 Megabytes (Standard Linux (x86, libc6). I moved it over to /usr/local and gunzipped it did a tar -xvf on it. That created a mysql-4.0.16-standard-bla bla bla directory. I cd'ed into that directory and read the manual.html document. I would advise you to read this document BEFORE you do anything. If you skip down to section 2.2.11 of the manual.html document titled Installing a MySQL Binary Distribution it shows the following:
 
The basic commands you must execute to install and use a MySQL binary distribution
 

Code:
shell> groupadd mysqlshell> useradd -g mysql mysqlshell> cd /usr/localshell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -shell> ln -s full-path-to-mysql-VERSION-OS mysqlshell> cd mysqlshell> scripts/mysql_install_dbshell> chown -R root  .shell> chown -R mysql datashell> chgrp -R mysql .shell> bin/mysqld_safe --user=mysql &
 
 
After you do all this the manual says to change the default password for root. There is no password for root. The default is there is no password. So you want to get that corrected right away. The manual also shows you how to set the root pasword. You can use MySQLAdmin or you can manually enter the password into the GRANT tables. If you know nothing about databases then you BETTER use mysqladmin to do it.
 

Code:
/usr/local/mysql/bin/mysqladmin -u root password <password>/usr/local/mysql/bin/mysqladmin -u root -h `hostname` password <password>
 
If mysql is installed on the same machine as you are on then hostname would be localhost.
 
To start the mysql server you invoke the startup script "mysqld_safe" by typing:
 

Code:
shell> ./bin/mysqld_safe --user=mysql &
 
To test you server type the following (this can also be found in sect. 2.4.0 of the manual)
 

Code:
shell> BINDIR/mysqladmin versionshell> BINDIR/mysqladmin variables
 
BINDIR is the bin directory where mysqladmin resides. On my system I would type:
/usr/local/mysql/bin/mysqladmin version
 
which would display the following:
 

Code:
mysqladmin  Ver 8.14 Distrib 3.23.32, for linux on i586Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult ABThis software comes with ABSOLUTELY NO WARRANTY. This is free software,and you are welcome to modify and redistribute it under the GPL license.Server version          3.23.32-debugProtocol version        10Connection              Localhost via Unix socketTCP port                3306UNIX socket             /tmp/mysql.sockUptime:                 16 secThreads: 1  Questions: 9  Slow queries: 0Opens: 7  Flush tables: 2  Open tables: 0Queries per second avg: 0.000Memory in use: 132K  Max memory used: 16773K
 
I won't show you what variables displays because it is too long beside you can see it all in the manual.
 
 
THE most important thiing you can do is follow the instructions at the very top. This will get your test and mysql database setup so that you can test and start creating your own databases to play with.
 
Finally to shutdown your server:
 

Code:
shell> BINDIR/mysqladmin -u root shutdown