?
Solved

Installation of MySQL Server

Posted on 2005-03-22
4
Medium Priority
?
535 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
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 Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

765 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