MySQL Programming Basics [Part -0]

I am assuming that your computer is configured maieksakiuela. None of them can configure the mysql down. For those who can not get easier If you are using Windows Curry wamp server can use. When Curry Linux Lamp server can use. Also, for any operating system XAMPP server can use. Now, I’m taking over your server is configured. You can easily create a database with

If you are using Windows curry and you can use the MySQL console.
As you use Linux I’m used to, so I’m traraminala. First you need to connect to MySQL. So you have to give your user name and password. Windows users do not have to remember the password. Password so they can keep the place empty. Write to traraminale
1
mysql -u root --password = polash
Mysql connect to the mysql command I’m trying to be. -u User name refers to the command. Here are my user name root. The –password = polash I gave my password. My local server is password polash. Palash you use a password you’ll find anywhere. Please note that the password is empty, there is the root password. If you are on the right way to do everything you can connect to mysql and a confirmation message will be shown below.
Welcome to the MySQL monitor. Commands end with; or \ G. 
Your MySQL connection id is 138 
Server version: 51413ubuntu1210 (Ubuntu)
Type ‘help;’ or ‘\ h’ for help. Type ‘\ c’ to clear the current input statement.
It is our job to create a database and then create a database table. Our command is to create a database CREATE DATABASE database_name ;. So let’s create a database. The database name will be widget_corp. Tyaraminale If you write code to create a database on:
1
CREATE DATABASE widget_corp;
If your database becomes your command and the like to provide you with a massage crieth Information
Query OK, 1 row affected (0.02 sec)
It is our job to create the table in the middle of the databejata’ve made. For this we will use this databejata. So you enter the command will be
1
USE widget_corp;
If you can just use the following command to confirm the massage package contains:
Database changed
Suppose that the table we will Creator will have the option between 4 pm. Id is a size 11 and it will auto-number Creator.As we go through the data Anti barabe automatic ID number is closer. Then the name of the cell would be the size of menu_name 30. Sometimes we write the name of the menu. The size of the cell, which then will be 3 position. Rogulo how we position the cell number will be set. The size of the cell will then be visible only 1. Our id NOT NULL PRIMARY KEY, and all will be selai. This table Creator commands us to be like this. Each of the two numbers with the command to enter the command. You can enter commands without having to enter all together. However, it will be difficult to understand. Let the Creator’s table.
1
2
3
4
5
6
7
CREATE TABLE subjects (
    id INT (11) NOT NULL auto_increment,
    menu_name VARCHAR (30) NOT NULL,
    position INT (3) NOT NULL,
    visible TINYINT (1) NOT NULL,
    PRIMARY KEY (id)
     );
If the command is correct, then you will get the following output
Query OK, 0 rows affected (0.01 sec)
Our table was then made.
Previous
Next Post »