Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Installation of MySQL Server

Posted on 2005-03-22
4
Medium Priority
?
545 Views
Last Modified: 2008-04-06
Hello Experts,
 
I want to install MySQL Server(Stable version, nice  if you can point me the url) on Sun Solaris 8/9(SPARC), so can any one provide me step by step on how to do this.(no links please..I need it in details)
 
Thanks in advance!
0
Comment
Question by:sachitjain
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
Umesh earned 2000 total points
ID: 13599506
Hi!

[Taken From Net]


The following article provides the steps necessary to successfully install the binary version of MySQL, release 3.23, on Solaris 2.8 and higher. These procedures should work as well on versions of Solaris as early as version 2.6.
I typically install MySQL in /usr/local/mysql as the UNIX root account. I then create a UNIX mysql account that will have access to manage databases.

Once you've installed MySQL, you will need to initialize the grant tables, start the server, and make sure that the server works okay. You may also elect to arrange for the server to be started and stopped automatically when your system starts up and shuts down.

Installing the grant tables is accomplished by running the mysql_install_db script. This creates the mysql database which will hold all database privileges, the test database which you can use to test MySQL, and also privilege entries for the user that run mysql_install_db and a root user (without any passwords).

Operating System Account

Create MySQL User Account:

  % groupadd -g 116 mysql
  % useradd -u 174 -c "MySQL Software Owner" \
      -d /u01/app/mysql -g "mysql" -m -s /bin/bash mysql
  % passwd mysql
Create MySQL UserID:


  % mkdir /u01
  % mkdir /u01/app
  % mkdir /u01/app/mysql
  % chown -R mysql:mysql /u01/app/mysql
   
Uncompress / Installing Binary Version of MySQL


NOTE: Because of a bug in Solaris tar, Solaris users should use gnu tar to unpack archives.

  % su -
  % cp mysql-3.23.54-sun-solaris2.8-sparc.tar /usr/local
  % cd /usr/local
  % gunzip mysql-3.23.54-sun-solaris2.8-sparc.tar.gz
  % gtar xvf mysql-3.23.54-sun-solaris2.8-sparc.tar
  % ln -s mysql-3.23.54-sun-solaris2.8-sparc mysql
  % cd mysql
  % scripts/mysql_install_db
  % chown -R root .
  % chown -R mysql data
  % chgrp -R mysql .
Starting and Stopping the MySQL Database Software


Starting the MySQL Database

  % bin/safe_mysqld --user=mysql &
Stopping the MySQL Database

  % bin/mysqladmin -u root shutdown
NOTE:  

The safe_mysqld startup script of MySQL 3.23.54 includes a small bug that leads to a "syntax error" message on startup. Here is a quick hint on how to fix it:
Open bin/safe_mysqld with a text editor. Go to line 162 and look for the following text:

  if $NOHUP_NICENESS -gt 0
  then
    $NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup"
Change it to look like this:
  if test $NOHUP_NICENESS -gt 0
  then
    NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup"
(Make sure to add "test" to the if-statement and remove the dollar sign from the $NOHUP_NICENESS= line)
This error will be fixed for MySQL 3.23.54a, which will be released shortly.
 

Testing the Installation


Ensure that the MySQL Software, the mysqld server, is running and you have set up the initial MySQL grant tables containing the privileges that determine how users are allowed to connect to the server. This is normally done with the mysql_install_db script.

Using mysqladmin

  % mysqladmin ping
  mysqld is alive
  % mysqladmin version
  mysqladmin  Ver 8.23 Distrib 3.23.54, for pc-linux on i686
  Copyright (C) 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.54
  Protocol version        10
  Connection              Localhost via UNIX socket
  UNIX socket             /tmp/mysql.sock
  Uptime:                 59 min 45 sec

  Threads: 1  Questions: 2  Slow queries: 0
  Opens: 6  Flush tables: 1  Open tables: 0
  Queries per second avg: 0.001
Ensure you can shutdown and startup the server
Starting the MySQL Database


  % bin/safe_mysqld --user=mysql &
Stopping the MySQL Database

  % bin/mysqladmin -u root shutdown
Try several simple tests

  % mysqlshow
  +-----------+
  | Databases |
  +-----------+
  | mysql     |
  | test      |
  +-----------+
  % mysqlshow -u root mysql
  Database: mysql
  +--------------+
  |    Tables    |
  +--------------+
  | columns_priv |
  | db           |
  | func         |
  | host         |
  | tables_priv  |
  | user         |
  +--------------+
  % mysql -u root -e "select host, db, user from db" mysql
  +------+---------+------+
  | host | db      | user |
  +------+---------+------+
  | %    | test    |      |
  | %    | test\_% |      |
  +------+---------+------+
 % mysql -u root mysql
  Reading table information for completion of table and column names
  You can turn off this feature to get a quicker startup with -A

  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 15 to server version: 3.23.54

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

  mysql> select host, db, user from db;
  +------+---------+------+
  | host | db      | user |
  +------+---------+------+
  | %    | test    |      |
  | %    | test\_% |      |
  +------+---------+------+
  2 rows in set (0.00 sec)



For more please visit here

http://www.idevelopment.info/data/MySQL/DBA_tips/Installing/SOLARIS323_2.shtml


For downloading mysql


http://dev.mysql.com/downloads/mysql/4.1.html


Also  you can try latest MySQL (alpha).. but please do read OS specific notes..


0
 
LVL 26

Expert Comment

by:Umesh
ID: 13599514

Although this article is for older version of mysql/solaris but I have used this for my stuff and it worked fine for me..



Hope This Helps!
0
 
LVL 16

Expert Comment

by:ellandrd
ID: 13599577
read the help page on www.mysql.com for installing on solaris...
0
 
LVL 12

Author Comment

by:sachitjain
ID: 13620113
Hi ushastry

Thanks for ur feeback
I shall be contacting u again whenever i would face any trouble in this. I hope u would not mind it.

Bye for now
Sachit.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question