Jun 16, 2017 Install My SQL Mac – The Guide on How To Install Mysql on Mac. Tutorial 1 – Install MySQL Mac, MacBook Pro, MacBook Air! Installing MySQL on a Mac – Pro, Air, or whatever. Let’s take it from the top! Install MySQL Mac – Tutorial one, is the first step to becoming a data analyst.
With newer versions of MySQL, it is becoming quite easy to install MySQL on macOS or Mac OS X
The first step is to download the MySQL server. You can download the MySQL Community Server for free from dev.mysql.com. Typically there are several versions of the Community Server available, including the latest stable release, the lastest release candidate, and the latest Alpha or Beta release. In this example, we are going to proceed assuming the 5.1 version of Community Server. Note that newer versions of MySQL may have differences from the instructions listed below.
Version 5.1 can be downloaded from this URL: https://dev.mysql.com/downloads/mysql/5.1.html
Select the macOS package format as the download format, and then select the appropriate link based on your version of the macOS / Mac OS X operating system.
This will download a .dmg file (Disk Image) to your machine. Double-clicking the disk image will show a window containing a mysql-<version>*.pkg file. Double-clicking this .pkg file will launch the installer that will install MySQL on your system. If you would like for MySQL to start each time your system starts, you can also launch the MySQLStartupItem.pkg file contained in the disk image.
The installer installs MySQL in the /usr/local/mysql-version directory. It also creates a symbolic link in the /usr/local directory called mysql.
To manually start MySQL, you can launch the Terminal application found in Applications/Utilities/Terminal. Once the terminal window appears, you can type the following:
cd /usr/local/mysql
Then type the following:
sudo ./bin/mysqld_safe
Enter your password when prompted. At this point, MySQL should be running on your localhost (127.0.0.1) on port 3306.
Now you can launch RazorSQL to create users for your MySQL instance. The Mac mysql installation includes by default a user named root with no password. You can use this account to connect to MySQL using RazorSQL.
To get connected with RazorSQL, select Connections -> Add Connection Profile, select MySQL from the database type list, and select the Auto Download Driver button to get the MySQL driver. Enter root for the login, nothing for the password, 127.0.0.1 or localhost for the host, and mysql for the database name.
After connecting, you can create a new user using the DB Tools -> Create -> Create User option. If you want the user to be able to access your MySQL instance from other machines, make sure to select the check the 'All Domains' option, or else click the 'Select Domains' button to add specific ip addresses / hosts.
The create user tool should generate SQL similar to the following:
GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'localhost' IDENTIFIED BY 'testpass' WITH GRANT OPTION;GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'%' IDENTIFIED BY 'testpass' WITH GRANT OPTION;
Download Mysql For MacMySQL JDBC for macOS
This tutorial shows how to set up a data source and connect to a MySQL® database using the Database Explorer app or the command line. This tutorial uses the MySQL Connector/J 5.1.46 driver to connect to a MySQL Version 5.5.16 database.
Downloading Mysql For Mac YoutubeStep 1. Verify the driver installation.
If the JDBC driver for MySQL is not installed on your computer, find the link on the Driver Installation page to install the driver. Follow the instructions to download and install this driver on your computer.
Step 2. Set up the data source.
You set up a data source using the Database Explorer app or the command line.
Set Up Data Source Using Database Explorer![]()
Set Up Data Source Using Command Line
After you complete the data source setup, connect to the MySQL database using the Database Explorer app or the JDBC driver and command line.
Mysql For Mac Command LineStep 3. Connect using the Database Explorer app or the command line.Connect to MySQL Using Database Explorer App
![]() Connect to MySQL Using JDBC Driver and Command Line
See AlsoAppsFunctions
Related TopicsComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |