AdSense

Tuesday, May 19, 2015

Installing MySQL on Mac: guide for dummies

This tutorial provides instructions to install mysql using Mac mini vault's Mac - script. For dummies and newbies like me, it is extremely convenient.

Before you start, please read the README file provided by MMV.

1. Copy the following command:

bash <(curl -Ls http://git.io/eUx7rg)

This command will automatically MySQL and install it. It will ask if you want to load MySQL on boot. Since I am installing in it on my laptop, I didn't choose that.

2. After MySQL is installed, close the terminal and reopen it again. Now you are able to operate MySQL on terminal.

3. Log in
If you are using your computer as the host, enter the following command:

mysql -u root -p

Otherwise, use this command:

mysql -h host -u username -p

You probably will have to ask your admin for the hostname.
Enter the password in the file that is located on your Desktop with the name "MYSQL_PASSWORD". It was generated automatically when you were installing MySQL.
If you are successfully logged in, you should be able to see this:


NOTE: 
If you get this error message: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

That usually means your MySQL server is not started. Go to step 5, start your server and try again.


4. Changing password 
MMV's Mac script will automatically generate a random password. Most of time it's hard to remember. If you want to change the password to a personalized one, after you log on to the server, do this: 


SET PASSWORD FOR 'root'@'localhost' = PASSWORD('SHIRLEY_IS_AWESOME');

Put your personalized password within the ' ' unless you want to set 'SHIRLEY_IS_AWESOME' as your password. ;)

If you happen to forget your password, MMV has this command to help you reset the password.Don't forget to read the README file.

bash <(curl -Ls http://git.io/9xqEnQ)

5. Start and Stop sql server (if it is your computer)
If you have selected to load MySQL on boot, then MySQL server will automatically start every time you start your computer. I don't use it very often, so I didn't select such option. Thus, I need to manually turn the server on.
Go to System Preferences:



Find MySQL: 

Open it, select Start MySQL Server:

Enter your admin password. If you see this green "running" signal, you are ready to go!


There are other more professional ways to start and stop the server, see here


1 comment:

  1. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. IEEE final year projects on machine learning In case you will succeed, you have to begin building machine learning projects in the near future.

    Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


    Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

    ReplyDelete