Compatible Support Forums: mysql & Redhat 9.0

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

mysql & Redhat 9.0

#1 User is offline   fuelinjection 

  • stranger
  • Group: Members
  • Posts: 1
  • Joined: 25-November 03

Posted 25 November 2003 - 12:16 PM

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
0

#2 User is offline   frequencydrive 

  • stranger
  • Group: Members
  • Posts: 7
  • Joined: 25-November 03

Posted 26 November 2003 - 04:45 AM

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 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/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 version
shell> 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 i586
Copyright &#40;C&#41; 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This 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-debug
Protocol version        10
Connection              Localhost via Unix socket
TCP port                3306
UNIX socket             /tmp/mysql.sock
Uptime&#58;                 16 sec

Threads&#58; 1  Questions&#58; 9  Slow queries&#58; 0
Opens&#58; 7  Flush tables&#58; 2  Open tables&#58; 0
Queries per second avg&#58; 0.000
Memory in use&#58; 132K  Max memory used&#58; 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

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users