[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] mysql 4 package?
- Subject: RE: [cobalt-users] mysql 4 package?
- From: Arthur Sherman <arturs@xxxxxxxxxxxxxxxx>
- Date: Tue Feb 10 12:08:02 2004
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
I managed to install mysql-4.0.17 on raq4r. This far it runs smoothly.
Following is a tut I wrote down for my reference. Thought it might be of use
to others.
BIG THANKS TO ALL YOU PEOPLE! SPECIALLY FOR THOSE GRAND MASTERS BEING HERE.
combined from 2 sources:
1) Bruce Timberlake's manual from
linux/cobalt-mysql.htm
2) http://www.mysql.com/doc/en/index.html
#cd /home/src
#wget link_to_SOURCE_download
#tar zxvf mysql-VERSION.tar.gz
#cd mysql-VERSION
#groupadd mysql
#useradd -g mysql -c "MySQL Server" -d /dev/null -s /sbin/nologin mysql
#CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
-felide-constructors -fno-exceptions -fno-rtti" ./configure \
--prefix=/home/mysql --localstatedir=/home/mysql/data \
--with-unix-socket-path=/home/tmp/mysql.sock \
--with-mysqld-ldflags=-all-static --enable-assembler \
--without-debug \
--with-extra-charsets=complex --with-mysqld-user=mysql
#make && make test
#make install
#./path_within_mysql_dir//mysql_install_db
#chown -R root:mysql /home/mysql
#chown -R mysql:mysql /home/mysql/data
#cp support-files/my-medium.cnf /etc/my.cnf
#chown root:sys /etc/my.cnf
#chmod 644 /etc/my.cnf
#cp ./support-files/mysql.server /etc/rc.d/init.d/mysql
#chmod +x /etc/rc.d/init.d/mysql
#/sbin/chkconfig --level 3 mysql on
Then we set up symlinks for all the MySQL binaries, so they can be run from
anyplace without having to include/specify long paths, etc.
#cd /home/mysql/bin
#for file in *; do ln -s /home/mysql/bin/$file /usr/local/sbin/$file; done
Edit /etc/my.cnf and add/uncomment:
skip-networking
to the [mysqld] section.
Now we can start the MySQL server!
#cd ~
#/etc/rc.d/rc3.d/S90mysql start
Let's "test" it to see what version we're running now:
#mysqladmin version
Now we'll set a new password for the MySQL root user (not the same as the
system root user!)
#mysqladmin -u root password new-password
(obviously, insert your own password instead of the "new-password" string!)
To run a quick test, use the command line program mysql:
mysql -u root -p
and enter your new root user password when prompted. You will then see the
mysql prompt:
mysql>
First, while we're in here, we'll take care of another security issue and
delete the sample database test and all default accounts except for the
MySQL root user:
mysql> drop database test;
mysql> use mysql;
mysql> delete from db;
mysql> delete from user where not (host="localhost" and user="root");
mysql> flush privileges;
Change the MySQL administrator account name from root to something harder to
guess.
mysql> update user set user="sqladmin" where user="root";
mysql> flush privileges;
Now, on with the "standard" testing... First, create a new database:
mysql> create database foo;
You should see the result:
Query OK, 1 row affected (0.04 sec)
mysql>
Delete the database:
mysql> drop database foo;
You should see the result:
Query OK, 0 rows affected (0.06 sec)
mysql>
To exit from mysql enter \q:
mysql> \q
Bye