Install Mysql from Source on Solaris/Solaris 上从源代码安装Mysql

To prevent the compiling problem with the “gcc: unrecognized option `-KPIC'” error, we can build a copy of gcc-compiled mysql and install the DBI-mysql for Perl or Mysql-Python interface for Python on Solaris.

1. Download GA source code from
2. Uncompress it
3. Download “cmake” and “libidn” from and use “pkgadd” to add them
4. Then run:
> cmake -D CMAKE_INSTALL_PREFIX:PATH=/opt/mysql -D MYSQL_DATADIR:PATH=/opt/mysql/data .
> make
> make install
You’ll get your own mysql compiling versiong by GCC

Leave a Reply

Your email address will not be published. Required fields are marked *