Jump to content
Compatible Support Forums
Sign in to follow this  
fuelinjection

mysql & Redhat 9.0

Recommended Posts

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

Share this post


Link to post

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

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×