Nyquest Discussion Forum

Search for a specific topic:

Post a discussion thread (click here to show/hide ):

John Chung
Changing login.sql
For those of you doing Banner upgrades, you know that constantly editing the login.sql is an absolute pain.

Constantly changing all the #UPDATEME# strings gets to be a bit tiring.

Do get around this, you can use the following sed trick to do a find/replace right on the command line:

$ sed -i -e 's/#UPDATEME#/u_pick_it/g' login.sql
John Chung
Compiling Mysql 5.7.11 for OSX 10.6.8
Good news! I finally got MySQL 5.7.11 working on Snow Leopard, but it does involve a bit of hacking.

Be sure you install macports and cmake prior to continuing. Also install Xcode which includes gcc-4.2.1

Here are the steps
1. Download mysql source for linux including boost 1.59 here:


Generic Linux (Architecture Independent), Compressed TAR Archive
Includes Boost Headers

2. extract and cd mysql-5.7.11
then run cmake with the following:

3. the OSX compiler does not recognize the -Wvla flag which is present in virtually _ALL_ flags.make files. This means you need to edit EACH one and remove this. (Around 158 files)

4. Edit the file ./storage/innobase/include/os0atomic.h
Add the following lines at line 233

#define os_compare_and_swap_thread_id(ptr, old_val, new_val)
os_compare_and_swap(ptr, old_val, new_val)

This should allow you to compile lock0lock.cc

5. Run make, then make install. This will install into /usr/local/mysql
6. Postinstall steps as root:

# cd /usr/local/mysql
# chown -R _mysql .
# chgrp -R _mysql .
# bin/mysqld --initialize --user=mysql

This step will generate the mysql root user password. Write this down!

# bin/mysql_ssl_rsa_setup
# chown -R root .
# chown -R _mysql data
# bin/mysqld_safe --user=_mysql &

You should now be able to connect to the database.

$ mysql -u root -p

John Chung
Compiling PHP 5.6.x with mysql support gives struct flock error
Hey, this was an interesting one.

While compiling PHP 5.6.19 on a mac running 10.6.8 today, during the configure step I found that if I tried to run configure --with-mysql or --with-mysqli support,

I would get the "configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no" error.

After searching for a LONG time, I found the following fix:

sh-3.2# ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/
sh-3.2# ln -s /usr/local/mysql/lib/libmysqlclient.a /usr/lib/
sh-3.2# ln -s /usr/local/mysql/lib/libmysqlclient.dylib /usr/lib/

after that things, seem magically to work.
John Chung
Compiling Mysql 5.6.x for OSX 10.6
OK, I admit it, I love OSX, but I don't care for any versions after 10.6.8 because they are so idiotic and iOS-like. This can cause problems if you need the latest software, since so many versions require more recent versions of the OS.

I recently needed to use MYSQL 5.6, and not finding any 10.6 binaries available, decided to compile my own from source.

Prior to doing this, be sure the have the following installed:

Xcode 4.2 for OSX 10.6 (this contains gcc)

Using macports, install git and cmake


Download the sources from the MySQL/Oracle website:


Select "MySQL Community Server 5.6" (as of this writing this will contain version 5.6.29. Note I was not able to get this working with version 5.7)

and then download "Generic Linux (Architecture Independent), Compressed TAR Archive"

Unpackage the archive, then:

$ cd mysql-5.6.29
$ cmake .
$ make
$ sudo su
# make install

the make install will install the binaries into /usr/local/mysql perform all the next steps as root:

# cd /usr/local/mysql
# chown -R mysql .
# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data

At this point, you are pretty much done. To start mysqld run the following:

# /usr/local/mysql/bin/mysqld_safe --user=mysql &

Then set a password for the mysql "root" user. (Totally different from the unix root user. The mysql root is like Oracle's sys user)

# /usr/local/mysql/bin/mysqladmin -u root password 'xxxxxx';

At this point, you're all done. Connect to mysql with the following:

$ mysql -u root -p

Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.6.29 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> show databases;
| Database |
| information_schema |
| mysql |
| performance_schema |
| test |
4 rows in set (0.00 sec)


John Chung
Firewalld Centos 7
Centos 7 uses different commands to manage the firewall.

firewall-cmd --get-active-zones

It will say either public, dmz, or something else. You should only apply to the zones required.

To open a port in the dmz or public, do the following:

In the case of dmz try:

firewall-cmd --zone=dmz --add-port=2888/tcp --permanent

Otherwise, substitute dmz for your zone, for example, if your zone is public:

firewall-cmd --zone=public --add-port=2888/tcp --permanent

Then remember to reload the firewall for changes to take effect.

firewall-cmd --reload