-
Basics of My SQL
I have just taken an admission in Java crash course where I need they people tend to use My SQL database along with the java programs. Now I don't have any idea about how My Sql works and how to make tables and etc in it. I mean to say I am totally new to My Sql thing. Can you guys guide me through the basics of My Sql?
-
Re: Basics of My SQL
MySQL is an SQL based RDBMS that executes only on a broad array of operating systems. MySQL is often used by PHP and Perl scripts. You need to get the SQL commands that apply to MySQL operating under all operating systems. But these instructions are according to the Windows OS. The spotlight is on Windows XP Professional and Windows 2000 Professional based computer machines. If you are running Windows 95, 98 or Me then please do not run mysqld installation because those operating systems are not capable to host a "service." So, you need to run MySQL as a standalone application by executing the command mysqld --standalone .
-
Re: Basics of My SQL
As soon as you finish activating the "MySQL 50 Shortcut" that you have created then starts typing the following.
then enter your password when prompted. You will then see the following output:
Code:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1 to server version: 5.0.51b
Type 'help;' or '\ h' for help. Type '\ c' to clear the buffer.
If you have got any error states that the client is not having support authentication protocol asked by server then you need to upgrading SQL client while trying to connect, This means that your client is using an older version then 4.1 whereas the server you are connecting to is using version 4.1 or later. The best resolution is to install a current version of the MySQL client.
-
Re: Basics of My SQL
Instruct to setup a new MySQL database
Code:
mysql 5.0.51b> create database database01;
Database database01 "created.
Ultimately it would be creating a new subdirectory in your M: \ mysql50 \ data directory. Now Open the database
Code:
mysql 5.0.51b> use database01
Database changed
To Create a table
Code:
mysql 5.0.51b> create table table01 (field01 integer, field02 char (10));
Query OK, 0 rows affected (0.00 sec)
-
Re: Basics of My SQL
The MySQL command line interface will let you to put a command on single line or stretch it across numerous lines. There's no dissimilarity in syntax among both of them. With various lines you would be able to break down the SQL statement into steps so that you can comprehend them easily. In multiple line mode, the interpreter reads those all lines as it should be reading. This will go on till a semicolon ";" comes to end the SQL statement. As soon as you press enter key after semi-colon then statement gets executed.
-
Re: Basics of My SQL
Creating a Database in MySQL-
The CREATE statement is used to create a database.
Syntax:
CREATE DATABASE tablename;
e.g.
CREATE DATABASE database1;
Creates a database named database1.
-
Re: Basics of My SQL
Once you are aware of some rudimentary commands in order to run a database in MySQL. As MySQL is operated by running SQL calls, you have a large array of extremely powerful tools at your disposal. For example, you're capable of showing data from more than a few tables at the same time by joining related fields. Likewise, SQL lets you run complex displays, updates or deletions of several records that fits detailed criteria.
Page generated in 1,713,492,890.83131 seconds with 11 queries