I'm in a world of hurt, so cut the duck jokes!! 😉

I just upgraded MySQL Mac from version 5.5.something to 5.6.1. Afterwards, my databases are gone. Where would I look for them? If they're completely kaput, I have a good Time Machine backup to restore them.

    probably in [font=monospace]/usr/local/[/font] (but who knows?).

    read this.

    and there are no duck jokes! I had a rubber duck moment yesterday.

      So you skipped the first step of the upgrade instructions?

      I wonder if this is the real reason that PostgreSQL requires backups to be made in major release upgrades, and the "binary incompatibility" is just to enforce that?

        use the time machine..... does it run off of banana peels and miller high life?

          Now i'm on the verge of panic. I can't get MySQL server to start. When trying to launch it, the error "/usr/local/mysql/bin/mysqladmin file is present." Sure enough the file is not there.

            When all else fails, hide all the evidence that you've even tried. So . . .

            I have been ambling through the real instructions @ http://docs.oracle.com/cd/E17952_01/refman-5.6-en/binary-installation.html All cruises along until i get here:

             scripts/mysql_install_db --user=mysql

            I am told:

            -sh: mysql_install_db: command not found

            So, I managed to get through that step, then this pops up:

            [QUOTE scripts root# /usr/local/mys/mysql-5.6.11-osx10.7-x86_64.7-x86_64/scripts/mysql_install_db --usr=mysql
            FATAL ERROR: Could not find ./bin/my_print_defaults

            ]If you compiled from source, you need to run 'make install' to
            copy the software into the correct location ready for operation.

            If you are using a binary release, you must either be at the top
            level of the extracted archive, or pass the --basedir option
            pointing to that location.

            [/QUOTE]

            I do not understand. I am in the same directory as the extracted archive. So, where do I go from here?

            Yes, I'm logged into terminal as "root"

            I'm not sure the light I'm seeing is a train headed right to me, or if the sun is shining out there

              I means you have to be in the first level of the extracted archive. IE: If you have ~/Downloads/test.zip and you extract it to ~/Downloads/test/ then you need ot be in ~/Downloads/test and not ~/Downloads.

              Hope that helps 🙂

                when it rains, it proverbially pours. I almost bagged another duck. I managed to get MySQL up and running, but when trying to access my databases, I get this error:

                Can't connect to MySQL server on '127.0.0.1' (61)

                After a hundred or so Google search queries, I found that /tmp/mysql.sock is missing. I can't find /tmp or /mysql.sock anywhere on my computer. Fiddling through Time Machine produced no results, either.

                More help, please. Save me from the loony bin and my supervisor's short list

                  timstring wrote:

                  ...

                  Love that reporting, there . . . I am sorry you're having a "day", though.

                  It's been raining cats & dogs here ... didn't see any ducks, however.

                    Adjust your "my.cnf" to use port 3306 then? MySQL will listen either via a UNIX socket (/tmp/mysql.sock is default) or TCP on port 3306. The error msg there shows it's looking for port 3306 on localhost IPv4 (127.0.0.1).

                    I'd try the following:

                    1. Use top or pgrep to attempt to determine if mysqld is running.
                    2. Use netstat to see if anything is listening on 3306 on any interface ...
                    3. Use find to see if "mysql.sock" is someplace besides /tmp ...
                     $top | grep mysql
                    24797 mysql     18   0  440m 321m 4604 S  2.0  8.1   3530:34 mysqld
                    
                    $pgrep mysqld
                    24773
                    24797
                    
                    $netstat -an | grep 3306
                    tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
                    
                    $ ls /tmp/*sock
                    /tmp/mysql.sock@

                    Check error logs for messages from mysql as well. Being as you're on OsX, (right?), there's probably some fancy graphical ways to investigate this as well.

                    HTH,

                      With a little help from my friends with some blood, sweat, and tears, I am triumphant. I know what to do first next time.

                      thanks

                        The mother of my problems:

                        Since upgrading to 5.6.11, my scripts are unable to log into my databases.

                        Error messages are

                        Warning: mysqli::mysqli() [mysqli.mysqli]: [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Library/WebServer/Documents/DispatchReports/TOABranch.php on line 27
                        
                        Warning: mysqli::mysqli() [mysqli.mysqli]: [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Library/WebServer/Documents/DispatchReports/TOABranch.php on line 27
                        
                        Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2002): No such file or directory in /Library/WebServer/Documents/DispatchReports/TOABranch.php on line 27
                        Hey you dolt, Failed to connect to MySQL: (2002) No such file or directory
                        Warning: mysqli::prepare() [mysqli.prepare]: Couldn't fetch mysqli in /Library/WebServer/Documents/DispatchReports/TOABranch.php on line 36
                        
                        Fatal error: Call to a member function execute() on a non-object in /Library/WebServer/Documents/DispatchReports/TOABranch.php on line 38

                        The offending code is:

                        $host="localhost";
                        $user="root";
                        $password="g1G3m#1989";
                        $Dbname = "CallsToDispatch";
                        
                        //Line 27
                        $mysqli = new mysqli($host, $user, $password, $Dbname);
                        
                        // Check connection
                        if ($mysqli->connect_errno) {
                            echo "Hey you dolt, Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
                        }
                        
                        $Quest = "SELECT WorkDate FROM InTimeAppts";
                        
                        //Line 37    
                        $stmt = $mysqli->prepare($Quest); //Line 38 $stmt->execute(); $DateResult = $stmt->get_result(); $row = $DateResult->fetch_assoc();

                        I've set passwords for every entity that needs access to MySQL, and when I compare that one in mysql.user with the script, they match. The user '_mysql' has read/write privileges in the MySQL folder and everything in it.

                        The only thing that has changed is upgrading MySQL from v5.5 to v5.6.11. Consider also all the trouble I had getting 5.6 installed. What could have happened between yesterday and today?

                        "I pray to God to save me from myself. That's one request He won't directly answer."

                          In your my.cnf configuration file, what is the value of the 'socket' parameter under the [mysqld] section? Is "skip-networking" commented out?

                          EDIT: Even better, let's just get that info straight from the source; connect to your DB (via PMA, the CLI, however you can) and execute this query:

                          SHOW VARIABLES WHERE Variable_name IN ('port', 'skip_networking', 'socket');

                          and let us know what the output is.

                            "Skip-networking" is not in the my.cnf file at all. Here's the sum total of its contents:

                            # For advice on how to change settings please see
                            # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
                            
                            [mysqld]
                            
                            # Remove leading # and set to the amount of RAM for the most important data
                            # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
                            # innodb_buffer_pool_size = 128M
                            
                            # Remove leading # to turn on a very important data integrity option: logging
                            # changes to the binary log between backups.
                            # log_bin
                            
                            # These are commonly set, remove the # and set as required.
                            # basedir = .....
                            # datadir = .....
                            # port = .....
                            # server_id = .....
                            # socket = .....
                            
                            # Remove leading # to set options mainly useful for reporting servers.
                            # The server defaults are faster for transactions and fast SELECTs.
                            # Adjust sizes as needed, experiment to find the optimal values.
                            # join_buffer_size = 128M
                            # sort_buffer_size = 2M
                            # read_rnd_buffer_size = 2M 
                            
                            sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

                              I'd be interested to see the output of the query I suggested above... but I'd be rather suspicious of the fact that the comment that says "These are commonly set, remove the # and set as required." was never heeded.

                              However it is you "upgraded" recently, might I suggest never ever following that process/procedure again? :p

                                the output of your query is Port 3306; skip_networking OFF; and socket /tmp/mysql.sock.

                                However it is you "upgraded" recently, might I suggest never ever following that process/procedure again?

                                next time i'll start with the instructions. 😉

                                  The error message seems to indicate that it thinks the socket should be in /var/mysql ... that's not the same as /tmp, as you're well aware, I'm certain.

                                  Perhaps your php.ini file is wrong ... if MySQL puts the socket in /tmp and php.ini thinks it's in /var/mysql ... then you'd have a problem. 😉

                                    Well at least mysqld was able to find some place to create its socket. From here, it looks like you have at least these three options:

                                    1. Leave the socket in /tmp/ and configure PHP's mysqli.default_socket parameter to look for it there.

                                    2. Change the mysqld configuration so that the socket is placed at /var/mysql/mysql.sock

                                    3. Re-install the MySQL server (using the official docs!) or at least re-do the "./configuration" (probably not possible if you used some package manager rather than compiling from source) so that you can choose a more proper location for the socket that will be propagated to the mysql_config file (e.g. /usr/bin/mysql_config) and whatnot.

                                    EDIT: Actually, I'll add a fourth possible option:

                                    1. Manually edit mysql_config (wherever it may be - check to see if [man]phpinfo/man offers any hints) and look for a line that contains "socket=" or ".sock" and fix the path.