1. Open your terminal. 2. Connect to MySql.If not use below link to know how to connect. How to Connect to MySql Database using MAC terminal 3. Once you logged into your mysql then type the below command to create a database.mysql> CREATE DATABASE OMS; Query OK, 1 row affected (0.00 sec)
1 row affected means Database is created successfully. 4. To use this Database OMS type below command.mysql> USE OMS; Database changed
5. Check which database you are using by using below command.mysql> SELECT DATABASE(); +------------+ | DATABASE() | +------------+ | oms | +------------+ 1 row in set (0.00 sec)
***********Happy Learning*************
MYSQL - Create Database
How to Connect to MySql Database using MAC terminal
1. Open your terminal. 2. Check your current directory by typing pwd.If you see above welcome message then you are logged in to your mysql database.$ pwd
Output :/usr/local/mysql/bin
your directory should be the bin folder of mysql else go to that directory by typing.$ cd /usr/local/mysql/bin
3. When you are in mysql bin folder login to your mysql database using below command and enter password.$ ./mysql -u root -p Enter password:
Output :Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 93 Server version: 5.7.19 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
Java - JDBC Connection Example-1.
JAVA INSTALLATION ON MAC
- Download the Java from Oracle official site.
- You can download from here : Oracle Site
- Double click on the file that is downloaded to launch it.
- Double click on the package icon to launch install Wizard.
- Click Next and Finish.
Basic Enum EXAMPLE
An enum type is a special data type that enables for a variable to be a set of predefined constants and the names of an enum type's fields are in uppercase letters.
In the Java programming language, you define an enum type by using the enum keyword.
Project Structure
OrderStatus.java
Test.java
OUTPUT
Download SourceCode From Github
ClickToDownloadHow to change Maven resources folder location ?
Maven resources folder contains all your project related xml files , images , text files.
If you want to change the default location from "yourproject/src/main/resources" to your required one or you want to add a new resource folder as per your project needs.
Follow below steps.
Go to your project pom.xml file and search for resources tag and add the new resource folder location with resource tag as below.
For example :Hope this is helpful..........!!!!Thank You.<!-- POM File --> <resources> <----------Old resource folder-----------------!> <resource> <directory>src/main/resources</directory> </resource> <----------New resource folder-----------------!> <resource> <directory>src/main/Yourrequiredfoldername</directory> </resource> <-----------------------------------------------!> </resources>
Featured Post
H1B Visa Stamping at US Consulate
H1B Visa Stamping at US Consulate If you are outside of the US, you need to apply for US Visa at a US Consulate or a US Embassy and get H1...
-
Ques 1 : Which declaration of the main method below would allow a class to be started as a standalone program. (A) public static int main(c...
-
1. Two Sum Two Sum Solution 2. LRU Cache LRU Cache Solution 3. Number Of Islands 4. Longest Palindromic Substring 5. Lowest...
-
basics Linux fundamentals like system calls , strace , linux mange memory, shared memory, kernel using, boot process, DNS resolving ( how t...