Download the “Mac OS X 10.9 (x86, 64-bit), DMG Archive” from mysql.com and install the pkg. Open the pref pane and start the MySQL Server. Update the path by editing /.bashprofile and add. Nonetheless, the MySQL GUI Tools bundle remains available, and can be successfully installed both on older OS X versions, such as Mac OS X 10.4, and on the more recent Yosemite operating systems. Easy to setup tools that can connect to your MySQL databases in no time.
Jump to: navigation, search
Yosemite and above native OSX install
This page is for people who want to do an OSX install without using someone else's packaging. There are some warning to bear in mind. A native install of Moodle on an OSX machine is not really suitable as an internet linked live server but it is great for testing and development. The OS X install described here is essentially the same as a Linux install and so the advice there can be applied here. Also Apple does not cooperate with your changes when upgrading the OS.
How to download netbeans on macbook. Most of this work is via the cli which you can use in the ‘terminal’ application. To edit files, use nano or vi (vim). Mostly you need to be root to edit the files so precede your editor name by sudo. e.g sudo nano /etc/apache2/httpd.conf or sudo vi /etc/apache2/httpd.conf
If you are doing any kind of development on an mac then consider an installation of XCode (you can get this from the app store) which will install all sorts of odds and ends that you are likely to need now and then such as libraries for php etc.
Apache on Mac
Since Mac OS X Yosemite Apache and PHP come packaged with the OS so you only need to enable PHP and install MySQL
Starting Apache
Since Apache is already installed you need to start it and to confirm it works. Start apache via command
If you want apache to start on boot then issue this command
Test apache by going to http://localhost in a browser. If you see a message saying 'It Works!!' , then apache is working correctly.
In case of issues to verify that apache is running search for httpd process (with approximate output)
To check port 80 with netstat (with approximate output)
Other apache related commands
Mac users are used to having a /Sites folder which publishes a local-users web site on http://<host url address>/~<UserName>
Mac Os Mysql Gui
edit <username>.conf
with these contents. Don’t forget to change <username> for your username.
Apache configuration for /Sites folder
If you want to set up /Sites folder, which is one of possible setups, and there is no /Sites folder on your mac, create one. Also create folders for moodle and moodledata inside /Sites folder.
Configure Apache to point to /Sites directory. Backup your httpd.conf, just in case, then open httpd.conf to make some changes
Change DocumentRoot to point to /Sites folder and uncomment httpd-vhosts.conf
Update httpd-vhosts.conf
Pick up a url you would use locally for moodle site, for example 'mymoodle.dev.com', and add to the bottom of the httpd-vhosts.conf file
Mac Os Mysql
Update /etc/hosts
Add a url for a local moodle site, the same as in httpd-vhosts.conf, to the bottom of /etc/hosts
Restart Apache
After moodle set up you should be able to point a browser to
in /etc/apache2/httpd.conf uncomment all the following lines
Since Moodle 3.3 minimum PHP version is 7.0.0 with PHP 7.1.x and 7.2.x also supported. If you have PHP 7 then php module would be
Restart apache for the changes to take effect
Apache user permissions on /moodledata folder
The default Apache user is '_www' and so your /moodledata folder needs write permissions for the _www user.
In the finder, choose the folder and using the get info dialogue to give _www write access to the folder.
Test php
Make a file in the root of your webfolder ( The default DocumentRoot for Mac OS X Yosemite is /Library/WebServer/Documents ) called phpinfo.php and add this content.
Then, visit the site by url
This should give you the well known phpinfo page. The most likely error will be a page just showing the text <?php phpinfo(); ?> which means php is not working.
php modules
To DoTemplate:update
Download your version of Mysql from the Mysql site http://dev.mysql.com/downloads/mysql/ and install it! The dmg install will allow you to start or stop the MySql server from your system preferences. If you tick the option to start on boot then it may not actually start on boot. This is an on-off issue with OSX.
If you are not running OSX Server then you will probably need to install Mysql again if Apple issues an upgrade of Yosemite.
dmg installed MySQL is in
After MySQL dmg installation if there is an issue with the MySQL PATH when mysql commands are run, add PATH to .bash_profile (if you are using bash)
Add path to mysql at the end of .bash_profile file you opened to edit
Reload .bash_profile
Start/stop/restart mysql
Connect to MySQL command line
Create moodle MySQL user, database and grant privileges
This is an easier alternative to installation of required packages. Homebrew is a package management tool like apt and yum which was created for OSX. Everything ends up in /usr/local or similar and when Apple does an upgrade, they shouldn't muck it up.The homebrew site is at http://brew.sh
Start with the command
Homebrew will download and install Command Line Tools for Xcode as part of the installation process.
Packages installed with Homebrew are in
PostgreSQL is one of the five databases supported by Moodle. You can use Homebrew to install PostgreSQL on OSX
Start/stop PostgreSQL manually
Start/stop PostgreSQL using brew
If there is an error on brew start/stop try running
Create a new database cluster (collection of databases), postgres user, start postgresql. By default user postgres will not have any login password.
![]()
Create a moodle user, database
PostgreSQL uses a client authentication file called 'pg_hba.conf' in PostgreSQL's 'data' folder. In this file, you'll find a list of which users are allowed to connect to which databases, the IP addresses they are allowed to connect from, and the authentication methods they can use to connect.
To grant permission for Moodle to connect to a PostgreSQL server on the same machine, add the following line, changing the DATABASE and USER columns to your actual database name and the username you set up above. The METHOD field should say 'password' - don't put your actual password here.
Download Moodle .tgz file of the version needed, for example https://download.moodle.org/download.php/stable36/moodle-latest-36.tgz, move it into /Sites folder
Point browser to url you have set up locally, for example, http://mymoodle.dev.com/. If there are errors in the browser
you might need to change the owner on just generated config.php file
Install database. Use Moodle admin password you have set up when running admin/cli/install.php script above.
If you are using PHP path /usr/bin/php when running above scripts and there is an error about PHP Intl extension php_intl try using /usr/local/bin/php which might be PHP installed with brew. To see what PHP you are using run
Retrieved from 'https://docs.moodle.org/38/en/index.php?title=install_on_OS_X&oldid=132990'
This should be really straightforward, but I found myself googling around. I wrote a recent post about how to create a web app with the Laravel PHP framework but connecting to the database was tricky.
Mysql Mac Os X Yosemite Download Free
First step, find out what version of OS X you are running. Click the apple icon in the top right corner of your screen and click “About This Mac”. I got something like this:
Next step, head over to the MySQL downloads page.
So with my computer I am running 10.11 and we want the .dmg file. Download Mac OS X 10.10 (x86, 64-bit), DMG Archive. Then you get to this lame screen:
MySQL is free and open source software (FOSS), you do not need to sign up or create an account. Click “No thanks, just start my download”. Download photoshow movie maker for mac. I let the download go directly to my “Downloads” folder when prompted, though you could place it anywhere. The download will take some time because it is 350mb, go get a coffee. Once the download is complete. Double click the file and a screen like this will open
Double click it and go through the install process.
When I did it I got an alert box:
Add to path. This went in ~/.zshrc because I am using ZSH. If you are using bash for terminal (the default on OS X) this will be the ~/.bashrc file or ~/.bash_profile. This post explains the difference between the two files.
Add the mysql download to your path so that you can use the “mysql” command from the command line.
Then test it out:
Now that we have MySQL installed and accessible from the Terminal, it’s time to connect to the database and start the MySQL server. Let’s log in as root user (root@localhost) and use that funky password that popped up in the alert window after our install. In the above case it’s
#fW&tYe?<8?w
Great! Now we can create databases and run SQL queries right from the command line. That’s an awesome start, but there’s no way anyone is going to remember that password, nor is it enjoyable to type in every time we want to run MySQL. The full docs on changing passwords are here. For OSX you can run the command:
Mysql Mac Os Client
The
PASSWORD('root') sets my password to “root”. Easy to remember right? You can set your password to anything you like, such as PASSWORD('myN3wp@Ssw0rd') .
To stop the server in the terminal run
control + D . Congratulations! You’ve installed MySQL on OSX, made it accessible from the command line and updated your password for the root user.
Mysql For Mac
https://flixrenew487.weebly.com/blog/free-download-access-2013-for-mac. To start setting up a Laravel application and connect to a database using Sequel Pro you can follow my next tutorial:
Thanks for reading!
Update (9/16/17): Expired passwords
When trying to login to MySQL on OSX recently I ran into the following error:
There are a lot of StackOverflow threads and articles about this, many require writing SQL commands, though that was difficult for me without access to the terminal. In order to alleiviate this I found this SO answer that saved me:
Update 03/29/18:
Update 05/14/19:
I found the solution in this homebrew issue. Create an empty directory for this path:
mkdir /usr/local/etc/my.cnf.d
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |