Sequel Pro 1.1: Exception when mysql_upgrade has not been run after upgrading MySQL to 5.7 (homebrew) #2302

Closed
phoenixgao opened this Issue Oct 22, 2015 · 47 comments

Projects

None yet
@phoenixgao

Test connection works fine, but once connect this error happens.

(Sequel Pro installed on Mac 10.10, mysql installed on remote ubuntu 14.04 server)

NSInvalidArgumentException

*** -[NSPlaceholderString initWithString:]: nil argument

(
    0   CoreFoundation                      0x00007fff8e42503c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff99e4076e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8e424eed +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff908182dc -[NSPlaceholderString initWithString:] + 102
    4   Sequel Pro                          0x000000010002e6a9 -[SPDatabaseDocument setConnection:] + 384
    5   Foundation                          0x00007fff9086bd00 __NSThreadPerformPerform + 293
    6   CoreFoundation                      0x00007fff8e341a01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    7   CoreFoundation                      0x00007fff8e333b8d __CFRunLoopDoSources0 + 269
    8   CoreFoundation                      0x00007fff8e3331bf __CFRunLoopRun + 927
    9   CoreFoundation                      0x00007fff8e332bd8 CFRunLoopRunSpecific + 296
    10  HIToolbox                           0x00007fff91e8356f RunCurrentEventLoopInMode + 235
    11  HIToolbox                           0x00007fff91e832ea ReceiveNextEventCommon + 431
    12  HIToolbox                           0x00007fff91e8312b _BlockUntilNextEventMatchingListInModeWithFilter + 71
    13  AppKit                              0x00007fff927469bb _DPSNextEvent + 978
    14  AppKit                              0x00007fff92745f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
    15  AppKit                              0x00007fff9273bbf3 -[NSApplication run] + 594
    16  AppKit                              0x00007fff926b8354 NSApplicationMain + 1832
    17  Sequel Pro                          0x0000000100001994 start + 52
    18  ???                                 0x0000000000000002 0x0 + 2
)
@dmoagx
Collaborator
dmoagx commented Oct 22, 2015

Where did you install MySQL from?

@phoenixgao

Am I the only one getting this error?

I installed (upgraded) mysql by following this document:
http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

mysql --version
mysql  Ver 14.14 Distrib 5.7.8-rc, for Linux (x86_64) using  EditLine wrapper

connect to mysql from console works fine.
When I try to connect from sequel pro, an error window pops up and sequel pro keeps the status "connecting..."
and It's empty in select datebases dropdown. But I can create a new database at that time and then all databases appears in the select dropdown.
If I click one of them I can see table list. If I click one of the tables, then sequel pro hangs.

@dmoagx
Collaborator
dmoagx commented Oct 23, 2015

http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Using that works fine for me with 1.1

Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-66-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Fri Oct 23 16:28:06 2015
max@ubuntu:~$ mysql --version
mysql  Ver 14.14 Distrib 5.7.8-rc, for Linux (x86_64) using  EditLine wrapper

Connecting works, I can see databases and select tables, etc.

Is this a fresh install or did you upgrade from a previous version?

@Dretch
Dretch commented Oct 27, 2015

I am getting the same issue. I am running OS X 10.10.5 (Yosemite) with MySQL 5.7.9 (client and server both on the same OS X machine).

I upgraded MySQL from 5.6.24 by copying the data folder from the old version to the new.

@dmoagx
Collaborator
dmoagx commented Oct 27, 2015

Um...that's nice and all, but if you don't provide any info for me to work with I can't help you either.

@dmoagx
Collaborator
dmoagx commented Oct 27, 2015

Btw, related crash report is: http://log.sequelpro.com/view/2434

@dmoagx dmoagx added the Bug label Oct 27, 2015
@phoenixgao

@dmoagx I upgraded from a previous version, which is default version installed via apt-get install mysql-server mysql-client. (I guess it was 5.5.x?) The phpmyadmin works, even my application works btw.

I will also try to install a fresh new one to see if it solves my problem, but I think there might be other people who did upgrade would see this error too.

@dmoagx
Collaborator
dmoagx commented Oct 28, 2015

Did you run the mysql_upgrade program?

@phoenixgao

Yes, I did. there was some timestamp columns default value was '0000-00-00 00:00:00' and I have to change them to default current_timestamp to complete the upgrade.

@Dretch
Dretch commented Oct 29, 2015

@dmoagx

Originally I had not run mysql_upgrade. Now I have, and (after restarting MySQL), SequelPro works!

I think the problem was that the SHOW VARIABLES MySQL command was returning an error because I had not run mysql_upgrade - it was returning this error string rather than a set of variables, and Sequel Pro was choking on it:

ERROR 1682 (HY000): Native table 'performance_schema'.'session_variables' has the wrong structure

@dmoagx
Collaborator
dmoagx commented Oct 29, 2015

@Dretch Thanks, that's something I can look into.

@dmoagx dmoagx removed the WaitingOnUser label Oct 29, 2015
@dmoagx
Collaborator
dmoagx commented Oct 29, 2015

OK, I could reproduce the issue by just replacing a mysql 5.5 server with 5.7 without properly upgrading.

I actually thought we had already fixed that issue (for another reason) but it looks like c7b5e88 did not make it into the 1.1 branch.

@dmoagx
Collaborator
dmoagx commented Oct 30, 2015

Fixed in d82dc7b for the 1.1.x branch

@dmoagx dmoagx added this to the 1.1.1 milestone Oct 30, 2015
@Dretch
Dretch commented Oct 30, 2015

Thanks !
El 30/10/2015 1:00 a. m., "Max Lohrmann" notifications@github.com
escribió:

Fixed in d82dc7b
d82dc7b
for the 1.1.x branch


Reply to this email directly or view it on GitHub
#2302 (comment)
.

@vihuvac
vihuvac commented Nov 18, 2015

I got the same error, Sequel Pro just stopped working even when it was working fine:

MySQL (installed via homebrew): mysql Ver 14.14 Distrib 5.7.9, for osx10.11 (x86_64) using EditLine wrapper

OS: Mac OS X 10.11.1 El Capitan

@Tamiyadd

Same error too, i'm using mysql installed via homebrew and OSX El Capitan

@giannisp

OS X El Capitan + homebrew + MySQL 5.7.9:
The fix was to run:
mysql_upgrade -u root -p
mysql.server restart

@vihuvac
vihuvac commented Nov 20, 2015

@giannisp awesome, it worked! Thank you very much 👍

@phoenixgao

�The error is because an old version server was not properly upgraded to 5.7.

To fix it need to run
mysql_upgrade
manually fix some fields if needed
and then restart mysql server

@phoenixgao phoenixgao closed this Nov 20, 2015
@Tamiyadd

worked like a charm, awesome!

thanks

@knilob
knilob commented Nov 20, 2015

Thanks, @giannisp. Running the mysql_upgrade command totally did the trick.

@Alhadis
Alhadis commented Nov 25, 2015

@giannisp: You ripper! :D That fix worked a treat, thanks cobber! 👍

I also have MySQL managed by Homebrew, so perhaps a recent update had something to do with it...?

@aginanjar

Yes, it's worked. Thanks @giannisp . 🚀

@Ardakilic

I had the same issue, none of the methods above worked, completely reinstalling the MySQL from homebrew fixed the issue for my case:

brew uninstall mysql
rm -Rf /usr/local/var/mysql
brew install mysql
mysql.server start
@dmoagx dmoagx reopened this Dec 3, 2015
@kjunggithub

I am on El Capitan and MySQL installed via homebrew. @giannisp's solution did it for me! Thanks.

@LucasKA
LucasKA commented Dec 9, 2015

+1 to @giannisp

Same issue

@bramchi
bramchi commented Dec 9, 2015

@giannisp great tip, worked for me too

@karolyi
karolyi commented Dec 13, 2015

+1, mysql_upgrade + restart fixed it, thx for the clarification

@dmoagx dmoagx changed the title from Sequel Pro 1.1 encountered an unexpected error when connecting to mysql 5.7.8 rc via ssh to Sequel Pro 1.1: Exception when mysql_upgrade has not been run after upgrading MySQL to 5.7 (homebrew) Dec 13, 2015
@vaske
vaske commented Jan 4, 2016

@giannisp thanks man!

@azharp
azharp commented Jan 7, 2016

many thanks! just saved my day.

@Elyx0
Elyx0 commented Jan 11, 2016

Saved my day too ! Pasted my exception *** -[NSPlaceholderString initWithString:]: nil argument sequelpro and ended up here. Thanks again.

@jsalamin

@giannisp Thank you, these commands fixed the issue!

mysql_upgrade -u root -p
mysql.server restart
@ciarant
ciarant commented Jan 13, 2016

@giannisp Thank you!

@taledo
taledo commented Jan 17, 2016

Glad I found this! The mysql_upgrade did the trick 👍

@hiddebraun

Same here, i have a homebrew installed mysql (5.7.10) and after a mysql_upgrade and mysql.server restart everything is working again ;-)

@Jatiba
Jatiba commented Feb 2, 2016

@giannisp Thank you, mysql_upgrade did the trick!
MacOS X 10.11.3 - Sequel Pro crashes after homebrew update of MySQL.

@anthony-robin

Thanks you @giannisp !

@resting
resting commented Feb 8, 2016

Thanks. mysql_upgrade -uroot did the trick for me.
Had to restart mysql after upgrade and boom!

@jsoprano

Guys, I'm still getting the same error when I try to connect with a user that is not root, if I connect with the root user everything works perfectly but the moment I try to connect with a user that has only access to one database even tho connecting with that user from the console works perfectly using sequel Pro I get the same error reported here. Tried the mysql_upgrade -uroot -p and restarted but still having the same issue.

Sequel Pro 1.1.0.1
MySQL 5.7.8-rc
Ubuntu 14.04.3

@jsoprano

Just downloaded the RC1a version from here: https://github.com/sequelpro/sequelpro/releases/tag/1.1.1-rc1 and now it works perfectly.

@dmoagx
Collaborator
dmoagx commented Feb 13, 2016

@jsoprano Nevertheless, please open Console.app and look for messages from Sequel Pro, there is still a high chance something is not right.

@jsoprano

@dmoagx just tested closing Sequel Pro, tailing the /var/log/system.log file and opening the app and connecting again and didn't find any logs written, should I be looking in a different log or that its ok?

@dmoagx
Collaborator
dmoagx commented Feb 13, 2016

system.log is fine usually.
If nothing is logged then your issue probably had a different cause - which would also match with mysql_upgrade not fixing the problem for you.
Do you still have a full crash report?

@jsoprano

@dmoagx yes, I did report it today the last time that it happened but I also have the crash report file or contents if you want me to mail it or paste it here, just let me know what you prefer.

@jbryanscott

I received the same error after upgrading from 5.5 --> 5.6 --> 5.7.11 on Ubuntu 14.04. This worked for me:

root@server $ mysql_upgrade -uroot -p
root@server $ sudo service mysql restart

@dmoagx
Collaborator
dmoagx commented Feb 20, 2016
@dmoagx dmoagx closed this Feb 20, 2016
@realwol
realwol commented Sep 28, 2016

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment