Hot answers tagged

46

Here is why your current code is not working: export PATH=${PATH}/usr/local/mysql/bin/ You forgot the colon and the trailing "/" is unnecessary. export PATH=${PATH}:/usr/local/mysql/bin is the correct code.


23

Try adding the following line to your .bash_profile file. export PATH="/usr/local/mysql/bin:$PATH" You can do this easily with the following command, which will append the line if the file already exists or create a new file with the line if it doesn't. echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profile


10

This will do it: brew tap caskroom/cask brew install brew-cask brew cask install mysqlworkbench


10

Open terminal, then: sudo launchctl list | grep -i mysql launchctl remove xxx.xxx.mysql Where "xxx.xxx" is included in the output of the first command, for example "org.macports.mysql". The password for the "sudo" command is your own user account's password. True, sudo isn't needed to "list" but because you already gave a sudo password for the first ...


8

export PATH="/usr/local/mysql/bin:$PATH" in .bashrc or .bash_profile file (cd ~/.bash_profile) This will tell your terminal where to find mysql command.


8

mysql-utils is a different cask brew cask install mysql-utilities if you do a brew search mysql you can see the caskroom casks $ brew search mysql automysqlbackup mysql ✔ mysql++ mysql-cluster mysql-connector-c mysql-connector-c++ mysql-sandbox mysql-search-replace mysqltuner homebrew/php/php53-mysqlnd_ms homebrew/php/php55-mysqlnd_ms ...


8

You probably enabled the MySQL launch agent with brew services start mysql in the past and forgot to disable the brew service (before uninstalling mysql) which would remove the plist. So unload and remove the agent from the launchd database manually with: launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist launchctl remove ~/Library/...


7

OK, so I found the culprit. It is amazing that no error message was visible in console or in the error logs, but I found a site which helped me a lot. http://blog.joshdick.net/2012/07/28/troubleshooting_apache_in_os_x_10.8_mountain_lion.html In that post, the author, Josh, suggested restarting apache using the following command: sudo bash -x /usr/sbin/...


7

You can accomplish this by going to your .bash_profile file and adding these lines to it. alias mysql.start="sudo /usr/local/mysql/support-files/mysql.server start" alias mysql.stop="sudo /usr/local/mysql/support-files/mysql.server stop" alias mysql.restart="sudo /usr/local/mysql/support-files/mysql.server restart" alias mysql.status="sudo /usr/local/mysql/...


7

You may change the port in the file com.oracle.oss.mysql.mysqld.plist file in /Library/LaunchDaemons by editing it with sudo nano /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist Change the port at <string>--port=3307</string> near the end of the file to whatever you need it to be and reboot your Mac or restart the service.


6

The following assume your MySQL 5.1 is installed in /usr/local/mysql-5.1.46-osx10.6-x86_64 and that MySQL 5.6 will install in /usr/local/mysql-5.6.11-osx10.7-x86_64. The exact directory names might differ depending on the exact version number you are using. Download the MySQL 5.6 installer, for instance in DMG format, and run mysql-5.6.11-osx10.7-x86_64.pkg ...


6

Starting and stopping the MySQL server via Preferences Pane/launchd and on the other hand via sudo /usr/local/mysql/support-files/mysql.server start/stop are not really compatible. After choosing "Launchd Support" in the MySQL installer the launch daemon com.oracle.oss.mysql.mysqld will be created and the MySQL preferences pane uses the launchd mechanism to ...


5

There is no way to make Numbers get data from a database. (It's more of a consumer tool.) https://discussions.apple.com/thread/1827581 A workaround: you can use Excel to grab the data, and import the XLS file to Numbers for prettier chart-making.


5

YES. Following homebrew caveats, did you setup launchd? To have launchd start mysql at login: ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents Then to load mysql now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist Well, now using mysql.server is pointless. It basically doesn't work, because (from my poor understanding) ...


5

My favourite way to install and run MySQL is via the Homebrew package manager. With Homebrew installed it's as straightforward as: brew install mysql This gets you the server and the command line connection tool. It's setup to run with no password, so it's not suitable for production use, but it's perfect for developing with. Homebrew takes care of putting ...


5

Just create an alias in your ~/.bash_profile or ~/.profile file. Check with ls -la0 ~/ if one of the files already exist, else create one with: touch ~/.bash_profile After opening .bash_profile with nano ~/.bash_profile add the lines: alias iwanttostartmysqlwithareallyshortcommand='sudo /usr/local/mysql/support-files/mysql.server start' alias ...


4

command not found just means that the executable you're trying to run is not found in any of the directories in your $PATH environment variable. Try /usr/local/mysql/bin/mysql The documentation links include a platform guide where it tells you that MySQL gets installed into /usr/local/, and then a symlink is created at /usr/local/mysql that points to this ...


4

Since upgrade to Yosemite updated your Apache, you have to update phpMyAdmin.conf to use new Access control syntax. Have a look at: http://httpd.apache.org/docs/2.4/upgrading.html In my case I need changed /etc/apache2/other/phpMyAdmin.conf Order allow,deny Allow from all to Require all granted More info here: http://www.zoubi.me/blog/you-dont-have-...


4

I like the alias answer. This is another route I found whilst looking. sudo ln -s /usr/local/mysql/support-files/mysql.server /usr/bin/mysql.server can now stop and start with sudo mysql.server start sudo mysql.server stop


4

To uninstall all files/packages installed by the shell script simply undo all commands executed in the script logged in with an admin account: Open System Preferences -> MySQL and stop the service if it's running Open the folder /Applications and drag SequelPro - if it was installed - to your trash. Open Terminal and enter sudo rm -R /usr/local/mysql-5.6.26-...


4

Based on your comment that when you go to site.local:8080 you get a white page with the words "It Works!" similar to the screen capture below What you are seeing is the webpage based on the global server configuration where the DocumentRoot is whatever default MAMP is set for. You mention in your OP that If I go to site.local:8080 it loads but doesn't ...


4

To completely uninstall MySQL OS X it is necessary to remove numerous files and folders and edit one file. To uninstall MySQL and completely remove it (including all databases) from your Mac do the following: Open a Terminal window Use mysqldump to backup your databases to text files! Stop the database server Remove files and folders: rm -rf ~/Library/...


4

The arrow means it is an alias or link, but it could lead anywhere. To find the destination, select the alias and press ⌘I (or right-click and choose Get Info), then look at the ‘Original’ path (or just open it and see where it leads).


4

I solved it! When I finally got it to write an error log (needed to fix the permissions for that) and looked inside the error log, I saw it was missing the symbol _clock_gettime(). When I googled that, I discovered MacOS didn't add that symbol until OSX 10.12, and I'm running 10.11 (so as not to break Dreamweaver CS6). I uninstalled MySQL 5.7.21 and looked ...


4

You need a space after vi and before the . so vi .bash_profile not vi.bash_profile. If you are not in your home folder you can also use vi ~/.bash_profile to specify the location as mentioned in ankiis answer below/above. Again you need a space after the vi. Alternatively, instead of using vi you can add your path to .bash_profileusing echo 'export PATH=/...


3

If the version of MySQL that was previously installed originated from the MySQL Community Downloads page on the SUN/Oracle site, it's likely that launchd is not involved with startup of the mysqld process. For some reason, the startup script that is distributed with MySQL uses the deprecated "Startup items" technology to start processes at boot. In fact, ...


3

The following worked for me with mysql 8.0.12 installed using Homebrew in macOS Mojave 10.14.1: rm -rf ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist


3

The log says it all: The script cannot write to the file /usr/local/var/mysql/xxx.local.err due to insufficient permissions. I assume the log file belongs to a dedicated mysql user while you are starting the process using your user account.


3

I had the same symptoms, but a different problem: perl, by default, runs as 64bit executable, but my mysql installation and hence all its libraries are 32bit only. Forcing perl to run in 32bit mode solved it: defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes


Only top voted, non community-wiki answers of a minimum length are eligible