happy cat image

everdevel

coding

login
NotificationX
  • Currently, only notices of comments are displayed.
  • no comment or please login

getting started MySQL

Now let's see how you can connect to macOS and windows10 before using the database.
Below we DESCribe how to connect to MySQL on macOS and windows10.

1. macOS

Let's take a look at how to connect to MySQL on macOS.
Of course, turn on mamp to make your computer a server and get started.
Open Launchpad and press Terminal.

mysql image

Open the terminal and you will see the following screen.

mysql image

I'll go to a folder where I can open MySQL. The move folder statement is cd.
Please enter the following statement:

cd /Applications/mamp/Library/bin
mysql image

Now we will enter a statement to connect to MySQL.

sudo ./mysql -uroot –p

sudo means superuser. Super User do What does super user run like?
And ./ already has the current location and mysql is literally mysql -u means the user name to connect to MySQL.
Enter root. -p is the root account password. The initial setting is root.
Enter the connection statement and enter the password of macOS when Password is displayed as follows.

mysql image

Enter the password of macOS and enter root, the default password for the root account.

mysql image

MySQL connection is successful if you see the following:

mysql image

To exit mysql, type exit.





2. Windows10

Let's take a look at how to connect to MySQL on macOS.
Of course, turn on mamp to make your computer a server and get started.
Type [cmd] in the search box on the taskbar.

mysql image

Run it and you will see the following screen.

mysql image

I'll go to a folder where I can open MySQL.
The move folder statement is cd.
Please enter the following statement:

cd /mamp/bin/mysql/bin
mysql image

Now that you have moved to the folder where MySQL is located, enter the statement to connect to MySQL.

mysql -uroot –proot

So if you look at mysql -uroot -p

-u is a registered user. That is, enter -u and enter your account ID. Since you are the super user, type -uroot
-p means to enter a password.
MySQL connection is successful if you see the following:

mysql image

To exit mysql, type exit.

mysql image

Thank you for visiting. If you have any inquiry or explanation of mistakes, please use the comments below.


    
    

Back to the course

ALL COMMENTS 0

Sort by