Software development, photography, jokes, ....

Sites by me

tas-logoTransportation Administration System
snoezelkussen-logo-kleinstSnoezelen Pillows for Dementia
ikzoekeenbegeleider-logoBegeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
logo 50x50Hey Vos! Je eigen emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
nettylogo2Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen
Professionele opvang bij Gastouderbureau
Salarisadministratie en belastingadvies bij
De Zaak Loont
Zutphense Bomenstichting

Hosting Favorites

ANU Internet Services
XelMedia .internet services


Google Translate
jQuery UI
YourHead Stacks API
Favicon Generator.
Password Generator.
Check HTTPS problems

Marc's Place


[Repair] MySQL Upgrade on Mac OS X

The following are instructions to help you repair a MySQL upgrade after running the package-installer for a newer MySQL version.
These steps can also be followed before you install a new version, just leave out the steps for the 5.6 version.

Some of these instructions can also be used on CentOS, or maybe other flavours of Linux. But on those systems, it is common practice to remove the old version and install a new version via yum.

1. Delete installation receipts:

$ su root
$ rm -rf /var/db/receipts/com.mysql.*

2. Delete current installations, except the one which /data-directory you want to keep:

$ cd /usr/local
$ ls -l
lrwxr-xr-x    1 root     wheel    27 22 feb 10:30 mysql -> mysql-5.6.29-osx10.8-x86_64
drwxr-xr-x    4 root     wheel   136 22 feb 14:08 mysql-5.1.37-osx10.5-x86
drwxr-xr-x   16 root     wheel   544 22 feb 10:30 mysql-5.6.29-osx10.8-x86_64

3. In this case, the mysql-5.1.37-osx10.5-x86 folder contains all data, i.e. my databases.
Rename this folder to something like mysql_previous:

$ ls -l
lrwxr-xr-x    1 root     wheel    27 22 feb 10:30 mysql -> mysql-5.6.29-osx10.8-x86_64
drwxr-xr-x   16 root     wheel   544 22 feb 10:30 mysql-5.6.29-osx10.8-x86_64
drwxr-xr-x    4 root     wheel   136 22 feb 14:08 mysql_previous

4. Remove the complete mysql instance and all other relevant files:

$ cd mysql-5.6.29-osx10.8-x86_64
$ rm -rf *

$ cd ..
$ rm mysql
$ rmdir mysql-5.6.29-osx10.8-x86_64

$ cd /Library/StartupItems/
$ rm -rf *MySQL*

$ cd /Library/PreferencePanes
$ rm -rf *MySQL*

$ vi /etc/hostconfig
[remove the line MYSQLCOM=….]

$ vi /Library/Receipts/InstallHistory.plist
                <string>MySQL 5.6.29-community</string>


$ launchctl unload -w /Library/LaunchDaemons/com.mysql.mysql.plist
$ launchctl unload -w /Library/LaunchDaemons/
$ ps -ef | grep -i mysql
    0 20842 20833   0  8:14pm ttys000    0:00.00 grep -i mysql

$ cd /Library/LaunchDaemons/
$ ls -l *mysql*
-rw-r--r--  1 root  wheel   348 27 mei  2015 com.mysql.mysql.plist
-rw-r--r--  1 root  wheel  1370 15 jan 04:16
$ rm -f *mysql*

$ cd /usr/local
$ vi
[change cq. add these copy commands:
cp -Rp mysql_previous/data/actman_pristine    mysql/data/
cp -Rp mysql_previous/data/audi            mysql/data/
cp -Rp mysql_previous/data/b1000        mysql/data/
cp -Rp mysql_previous/data/begeleider        mysql/data/
cp -Rp mysql_previous/data/BSZBlogger        mysql/data/
cp -Rp mysql_previous/data/bu2012        mysql/data/
cp -Rp mysql_previous/data/daimler        mysql/data/
cp -Rp mysql_previous/data/fcs_rgl        mysql/data
cp -Rp mysql_previous/data/fse_auth        mysql/data/
cp -Rp mysql_previous/data/fse_dta        mysql/data/
cp -Rp mysql_previous/data/fse_ttt        mysql/data/
cp -Rp mysql_previous/data/fse_ttt_if        mysql/data/
cp -Rp mysql_previous/data/handidate        mysql/data/
cp -Rp mysql_previous/data/logdict        mysql/data/
cp -Rp mysql_previous/data/lwa_fw        mysql/data/
cp -Rp mysql_previous/data/proftpd        mysql/data/
cp -Rp mysql_previous/data/sds82        mysql/data/
cp -Rp mysql_previous/data/tas            mysql/data/
cp -Rp mysql_previous/data/wht            mysql/data/

$ chmod a+x

$ cd /usr/local/lib/mysql
$ rm -rf *
$ cd ..
$ rmdir mysql

At this point, RESTART YOUR MAC

Install the new MySQL version

5. Download MySQL, for example the latest 5.6 and install.

6. Check if it is running via System Preferences -> MySQL (and eventually start it via this preference pane)

7. Start Navicat  or MySQL Workbench and login with user root without password and then set the password. Logout and login again with password.

The tutorial on how to use Navicat :
A good tutorial on how to use MySQL Workbench at Guru99 :

8. Create the user lasso for both Lasso 8 and Lasso 9, and set passwords for other root-users

9. Run the copy script:

$ su root
$ cd /usr/local
$ ./
$ mysql_upgrade -uroot -p --force

and then restart MySQL in one of these ways:

$ /etc/init.d/mysqld restart (CentOS 6)
$ service mysqld restart
$ service mysql restart

10) Start Navicat  or MySQL Workbench and check if all databases show in localhost.

11) Now you can remove the previous MySQL version:

$ cd /usr/local/mysql_previous
$ rm -rf *
$ cd ..
$ rmdir mysql_previous

12) Check if both Lasso 8 and Lasso 9 have access:
- By running http://localuser/[webapp], or
- By checking in SiteAdmin (L8) and/or Lux (L9).


Donate via Paypal
© 1997- Marc Vos (and others)   -   Privacy Statement   -    Contact Me