It is easier to install MySQL in Solaris than to install Oracle. The following describes how to install MySQL in Solaris. Operating System: Number of solaris10.
It is easier to install MySQL in Solaris than to install Oracle. The following describes how to install MySQL in Solaris. Operating System: Number of solaris10.
It is easier to install MySQL on Solaris than to install Oracle. The following describes how to install MySQL on Solaris.
Operating System: Solaris10
Database: mysql5
Mysql-5.1.42-solaris10-i386.pkg.gz
1. Transfer media to the server
I use FTP to upload the media to the server.
Ii. Unpack
# Gzip-d/opt/databases/mysql-5.1.42-solaris10-i386.pkg.gz (/opt/databases/is where I store the Media)
3. Create Mysql users and groups
# Groupadd mysql
# Useradd-G mysql
4. Install using pkgadd
# Pkgadd-d/opt/database/mysql-5.1.42-solaris10-i386.pkg
(Follow the prompts to complete the installation process)
After installation, Mysql is installed in the/opt/mysql directory by default.
5. Create the my. cnf file in the/etc directory
# Vi my. cnf
[Mysqld]
Basedir =/opt/mysql
Datadir =/opt/mysql/data
6. Install the database
# Cd/opt/mysql
#./Scripts/mysql_install_db -- defaults-file =/etc/my. cnf -- user = mysql
7. start/stop MySQL
#/Etc/init. d/mysql start (start)
#/Etc/init. d/mysql stop (stop)
8. Modify the root user password
#/Opt/mysql/bin/mysqladmin-u root password 'new-password'
#/Opt/mysql/bin/mysqladmin-u root-h hostname password 'new-password'
9. Add a remote user for MySQL
Method 1:
Use root to log on to mysql (here root refers to the root user in mysql)
Mysql> grant all privileges on *. * TO admin @ localhost identified by 'something' with grant option;
Mysql> grant all privileges on *. * TO admin @ "%" identified by 'something' with grant option;
Method 2:
Mysql> insert into user VALUES ('localhost', 'admin', PASSWORD ('something'), 'y ', 'y', 'y ')
Mysql> insert into user VALUES ('%', 'admin', PASSWORD ('something'), 'y ', 'y', 'y ')