Mysql is part of both Solaris and OpenSolaris in  the /usr/sfw dir.
This is how I had configured it!
Login in as root:
bash-3.2# groupadd mysql
bash-3.2# useradd mysql -g mysql
bash-3.2# passwd mysql
New Password:
Re-enter new Password:
New Password:
Re-enter new Password:
passwd: password successfully changed for mysql
chown mysql:mysql /var/mysql /export/home/mysql
bash-3.2# mkdir /export/home/mysql
bash-3.2# su - mysql
Sun Microsystems Inc. SunOS 5.11 snv_78 October 2007
$
cp /usr/sfw/bin/mysql_install_db ./mysql_install_db
# diff /usr/sfw/bin/mysql_install_db ./mysql_install_db
280c280
< i_u="INSERT INTO user VALUES 
('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y', 
'Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
---
> i_u="INSERT INTO user VALUES 
> ('localhost','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'
>  ,'Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
283,284c283,285
< i_u="INSERT INTO user VALUES 
('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y', 
'Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
< REPLACE INTO user VALUES 
('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y', 
'Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
---
> i_u="INSERT INTO user VALUES 
> ('localhost','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'
>  ,'Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
> INSERT INTO user VALUES 
> ('192.168.0.','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y
>  ','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
> REPLACE INTO user VALUES 
> ('$hostname','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'
>  ,'Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
285a287
> INSERT INTO user (host,user) values ('192.168.0.','');
372c374
< echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
---
> echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL mysql USER !"
374,375c376,377
< echo "$bindir/mysqladmin -u root password 'new-password'"
< echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
---
> echo "$bindir/mysqladmin -u mysql password 'new-password'"
> echo "$bindir/mysqladmin -u mysql -h $hostname password 'new-password'"
413c415
< echo "shell> $bindir/mysql -u root mysql"
---
> echo "shell> $bindir/mysql -u mysql mysql"
bash

$ cp /usr/sfw/bin/mysql_install_db .
$ vi mysql_install_db
# change the root to mysql add a client ip for remote access if needed.
$ sh ./mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
071223 14:38:37 /usr/sfw/sbin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL mysql USER !
To do so, start the server, then issue the following commands:
/usr/sfw/bin/mysqladmin -u mysql password 'new-password'
/usr/sfw/bin/mysqladmin -u mysql -h familypc password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
/usr/sfw/bin/mysqld_safe &

You can test the MySQL daemon with the tests in the 'mysql-test' directory:
cd /usr/sfw/mysql/mysql-test; ./mysql-test-run

Please report any problems with the /usr/sfw/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

$
$ sh ./mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
071223 14:38:37 /usr/sfw/sbin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL mysql USER !
To do so, start the server, then issue the following commands:
/usr/sfw/bin/mysqladmin -u mysql password 'new-password'
/usr/sfw/bin/mysqladmin -u mysql -h familypc password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
/usr/sfw/bin/mysqld_safe &

You can test the MySQL daemon with the tests in the 'mysql-test' directory:
cd /usr/sfw/mysql/mysql-test; ./mysql-test-run

Please report any problems with the /usr/sfw/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

$ usr/sfw/bin/mysqladmin -u mysql password 'mysqlpw'
usr/sfw/bin/mysqladmin: not found
$ ^[[A^[[D
^[[A^[[D: not found
$ bash
bash-3.2$ /usr/sfw/bin/mysqladmin -u mysql password 'mysqlpw'
/usr/sfw/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' 
(2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
bash-3.2$ /usr/sfw/bin/mysqld_safe &
[1] 1547
bash-3.2$ bash: /usr/sfw/bin/mysqld_safe: No such file or directory

[1]+ Exit 127 /usr/sfw/bin/mysqld_safe
bash-3.2$ /usr/sfw/sbin/mysqld_safe &
[1] 1548
bash-3.2$ Starting mysqld daemon with databases from /var/mysql

bash-3.2$ /usr/sfw/bin/mysqladmin -u mysql password 'mysqlpw'
bash-3.2$ /usr/sfw/bin/mysqladmin -u mysql -h familypc password 'mysqlpw'
bash-3.2$ mysql -u mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.24

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
password has not been set is null, hit enter
bash-3.2# su - jbrewer

Sun Microsystems Inc. SunOS 5.11 snv_78 October 2007
$ mysql -u jbrewer -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.0.24

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye
$
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-help mailing list
opensolaris-help@opensolaris.org

Reply via email to