View Single Post
Old 10-05-2005, 05:52 PM   #5 (permalink)
sandman
Junior Member
 
Join Date: Jul 2005
Posts: 36
Default

Here is an example for installing MySQL 3.22.25-1

For this installation you will need to install the following RPMs:

MySQL-3.22.25-1.i586.rpm
MySQL-client-3.22.25-1.i586.rpm
MySQL-bench-3.22.25-1.i586.rpm
MySQL-devel-3.22.25-1.i586.rpm
DBI-perl-bin-0.93-1.i386.rpm
mysql-DBI-perl-bin-1.825-1.i386.rpm


Also... the MySQL-bench RPM requires MySQL-DBI-perl-bin (not mysql-DBI-perl-bin). As it works fine when installed with nodeps I think there may be a problem with "case" in the src.rpm used to build the binaries. The functionality appears to be correct regardless.

[root@ntbox /root]# rpm -Uvh MySQL-3.22.25-1.i586.rpm
MySQL ##################################################
Creating db table
Creating host table
Creating user table
Creating func table
Creating tables_priv table
Creating columns_priv table


REMEMBER TO SET A PASSWORD FOR THE MySQL root USER This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.

The latest information about MySQL is available on the web at http://www.mysql.com

Starting MySQL daemon with databases from /var/lib/mysql
[root@ntbox /root]# /usr/bin/mysqladmin -u root xxxxx 'xxxxxxxx'
/usr/bin/mysqladmin: Unknown command: 'chasm1'
[root@ntbox /root]# /usr/bin/mysqladmin -u root password 'xxxxxxxx'

So, at this point you've setup the "root" user password for MySQL. There is a disconnect between the docs and the MySQL RPM because the documentation encourages the execution of a script called /usr/bin/mysqlinstalldb. This script is unnecessary because it is executed at the end of the RPM installation. The script mysqlinstalldb creates six tables (user, db, host, tables_priv, columns_priv and func) in the MySQL database.

The script also does the following things:

The MySQL root user is created as a superuser who can do anything. Connections must be made from the local host. Note: The initial root password is empty, so anyone can connect as root without a password and be granted all privileges.
An anonymous user is created that can do anything with databases that have a name of 'test' or starting with 'test_'. Connections must be made from the local host. This means any local user can connect and be treated as the anonymous user.
Other privileges are denied. For example, normal users can't use mysqladmin shutdown or mysqladmin processlist.
So... the warning given by the script:

AGAIN REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'

NOTE: DO NOT MESS THIS UP. IF YOU DO MAKE A MISTAKE ISSUE AN "rpm -e MySQL" FOLLOWED BY "rm -Rf /var/lib/mysql" AND THEN REINSTALL MySQL.

The installation, all the way to a working set of "demo" tables, is complete after the mysqlinstalldb script has run for the first time, so essentially, for MySQL you install the RPMs and as long as they don't die on install you're done.

Your database should now working.
sandman is offline   Reply With Quote
Sponsored Links