I installed MAMP on my Mac and it installed everything needed such as Apache, MySQL and so on and I can use everything w/o any problem but when I try to say man mysql to read manual on the Terminal, this is the error I receive:
No manual entry for mysql
I did some Google searches but haven't seen anything useful except for manpagez.com which is online documentation.
You can do mysql --help to get all the help for mysql. Is there something specific that you want about man command that you can't do with mysql --help
MAMP is different from actually installing unix stuff.
For unix type stuff like manpages, see macports: http://www.macports.org/ This will also allow you do install things like wget as you would normally do via apt-get.
Note MAMP is the only way I've actually gotten this stuff to get the full XAMP stack working on a Mac.
In terminal navigate to your mysql install, usually in a location like /usr/local/mysql
Then type at the $ prompt: man -M ./man mysql
or: man -M ./man mysqld_safe
I'm not sure where to get a full list of what's in the mySQL man pages, but at least its a start.
as stated before
$: mysql --help is useful too
Related
Anyone have the inside scoop on when Homebrew will be updated to support MySQL 8's first general release (8.0.11)? I can't seem to find it by searching, but I bet someone here knows :)
Homebrew pushed MySQL 8.0.11 as an upgrade yesterday (Wed, 13 June 2018). I thought I had it pinned, but no such luck.
It's a total disaster:
MySQL 8.0.11 uses caching_sha2_password as the default authentication method (leave it to Oracle to do something like this in a point release, but there you have it).
So far, it breaks everything I've tried: phpMyAdmin, Nextcloud, and WordPress.
I'll be rolling back to 5.7.22 later today.
Update 17 June 2018 6:50PM CDT:
Three step solution:
Add to [mysqld] section of my.cnf file (found in /usr/local/etc/ for Homebrew's installation):
default-authentication-plugin=mysql_native_password
At shell prompt:
mysql -u root -p
> ALTER USER 'root'#'localhost'
IDENTIFIED WITH mysql_native_password
BY '[password]';
> exit
Reboot server
brew services restart mysql
Short version solution
Long version solution
Update 18 June 2018 11:53PM CDT:
The solution provided above is partial, at best. In my experience MySQL 8.0.11 is not nearly ready for production (or even development) use.
I managed to overcome this without removing my all database which from mysql version 5.7.
First, simply upgrade database with this command
mysql_upgrade -u root
https://stackoverflow.com/a/51486493/2342289
Last. Install sequel-pro-nightly. I need this because i can browse my db from the command but not from sequal-pro. So, luckily the nightly sequel-pro works.
brew cask install sequel-pro-nightly
Then, boom. Everything is back. Sigh.
It's waiting to be merged into homebrew-core.
https://github.com/Homebrew/homebrew-core/pull/27210
Removed MySql using the steps on this site.
Do brew install mysql#5.7.
Go to this site and follow the instructions starting at step 4.
Be sure to find out if the paths on step 5 actually exist on your machine. The paths listed on that site didn't work for me. I had to find them on my own. Start by looking in /usr/local and search out the mysql folder from there and dig until you find the files he has listed.
I stopped at step 7 because I was able to take it from there. Hopefully, you can as well.
Ok I have a mess of a problem. MySQL was installed on my machine (mac) already but I could not login via terminal (fairly new machine, to me). I had already been working with a couple databases via a SequelPro and decided to login via terminal for a couple jobs.
I couldn't and couldn't figure out why not. I ran brew install mysql and to my surprise it installed mysql. When logging in via terminal I was taken to this instance of MySQL that did not have my databases. Now, I restart SequelPro and it now logs into the new instance vs the one that has my data.
Any idea where I can find my databases and get them to use this new instance? Or any thoughts on how to clean things up in general?
---update---
The DB is InnoDB
/usr/local/bin/mysql
/usr/local/Cellar/mysql
/usr/local/Cellar/mysql/5.6.25/bin/mysql
/usr/local/Cellar/mysql/5.6.25/include/mysql
/usr/local/Cellar/mysql/5.6.25/include/mysql/mysql
/usr/local/Cellar/mysql/5.6.25/share/doc/mysql
/usr/local/Cellar/mysql/5.6.25/share/mysql
/usr/local/include/mysql
/usr/local/Library/LinkedKegs/mysql
/usr/local/opt/mysql
/usr/local/share/doc/mysql
/usr/local/share/mysql
/usr/local/var/mysql
/usr/local/var/mysql/mysql
/usr/local/var/mysql is where my databases from the first instance are. /Cellar is where homebrew installed MySQL. I got a recommendation in the comments to add a symlink...not sure which folder I should use as source or target in this case.
Also, not sure how I would start the database from the old location either.
Any help is most appreciated!
Short script to get the old db running:
GO to the working database data location
Go up one directory
Shutdown any mysqld.
mv database_directory database_directory.backup
Symlink the data directory of any other mysql:
ln -s old_data_directory database_directory
I am a a newbie to database programming and I want to try out MySQL.
I just installed MySQL from the official website, I am running mac 10.8.2.
Anyways, whenever I try to run a simple command like $>mysql.server start
it says Permission denied.
I am able to open it through sudo but I would love to get this fixed as this is annoying me, that it wont work properly. I have been searching for the last two hours without finding a fix, so I was hoping anyone could give me a helping hand.
The easiest way is to install the MySQL Startup Item. Then you get a Preference pane for MySQL.
See http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-startupitem.html for full instructions.
Re your comment:
It's often required for services like mysql.server need to run as a uid other than your user login. For instance, the MySQL data directory may only be writeable by the mysql uid. So starting such a service must be done from a user that can change the uid of the process. The root uid can do that, so it's necessary to use sudo to launch service processes like mysql.server.
TL;DR: YOU HAVE TO USE SUDO.
If you a absolute newbie to MYSQL and you just want to use the MYSQL server to test your code on you local MAC I would advice you to take a look at XAMPP / MAMP. Xampp offers a complete out of the box install for everything you need for a development servers (Apache server, MySQL, PHP, etc). Note, that I XAMPP / MAMP is not suitable for production server setting.
I personally use the XAMPP Windows version. I haven't tried MAMP but I have come across it many times . The XAMPP for Mac version seem not to have been update for a while so I suggest you give MAMP a try.
You could of course try to get your current install to work but that might require some work. Also with regard to firewall / security issues. With the out of the box version you will have to do a lot less. Why reinvent the wheel if you can easily install a out of the box version.
I'm getting kind of desperate here trying to get mysql to work on osx lion.
I've been through nearly every article on the web these past few days looking for a way to fix the problem with the error.
When I try to start the server is gives this error:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
when I try to create a database with 'rake db:create' it gives the same error.
sometimes it says that or I get errors about "please install gem-blabhalbhabhlb". And that gem doesn't exist.
I was able to install mysql in terminal using the dmg version from mysql's site but after I deleted the installation files it just stopped working- as in when I run
rake cd:create
I get the mysql.sock error.
I'm going insane.. please help
For me I often need to force mysql to not use unix sockets, but regular php sockets.
To do this, connect to 127.0.0.1 instead of localhost. Works 90% of the time, all the time.
Major credit to John P. for helping me get this working last night
The first thing was to uninstall mysql using 'brew uninstall mysql'.
Then to install mysql from their development site. The community .dmg 64 bits version.
Then to find out where the path was pointing.
So in updating the paths he had to find where bin/mysql was and make sure bash_profile had it's path there.
PATH=$PATH:/usr/local/mysql/bin
The essential step after that was to 'source' the file so he had me run this command.
source ~/.bash_profile
From there mysql works flawlessly.
I have been using MySQL Tuner (http://mysqltuner.com) on Linux for a while and am quite comfortable with it. Now, for whichever reason, we have had to start hosting other websites on IIS. Is there a similar tuning utility that may recommend config changes to MySQL on Windows Server 2008?
Kind regards
I have just ported the mysqltuner.pl script to Windows - see http://mysqltuner.codeplex.com/. It uses the same checks as version 1.2 of the mysqltuner.pl script, but in a nice, friendly Windows application - no need to install Cygwin or Perl.
Ok so this is over a year after the question but I thought it relevant because you can actually still use the mysqltuner script if you combine it with Cygwin.
Install Cygwin
Make sure Perl is installed
Additionally I installed the mysql and the mysqld packages as well (Needed for the script to connect to a "remote" MySQL.
Copy the mysqltuner.pl script to your Cygwin user home directory (Found under cygwin_install_dir/home/your.user)
Start the Cygwin terminal
Run the script $ perl mysqltuner.pl --host mysql_host_ip --forcemem 512
If you encounter an error in the line of:
ERROR 1130 (HY000): Host 'somename.company.com' is not allowed to connect to this MySQL server
Go to the database server and add the appropriate user and privelages
You should now be able to use mysqltuner in a windows environment against local as well as remote MySQL servers.
...screenshots removed because I'm not allowed to use images yet, sorry.
Don't know of another tool (outside the MySQL Instance Configuration Wizard you can run) like mysqltuner which will not run unfortunately. You can install Perl on Windows, but when run the .pl file you will get an error about $PATH not having mysqladmin in it. Upon reading of the manual laughing, it plain as day states there is no Windows support for 1.2.0 version of tool.
You can see if these suggestions help in the interim:
http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/
Edit: I just found this: http://www.webyog.com/webyog/monyogscreenshots
MONyog, it is a paid product, though. I installed the trial and it looks very promising. It monitors your SQL server and gives you alerts and recommendations based on those alerts. Might be worth a look. I cannot vouch for too much other than it has some nice information in just a short period of time.