Skip to main content

MySQL School

Basic Setup of MySQL Server (windows only)

- shutting down MySQL server
mysqladmin -u root -p shutdown

- removing service
mysqld --remove

- installing service
mysqld-max --install

- starting up for first time
mysqld-max --standalone


Basic Setup of MySQL Server (all systems)

- first login

mysql -u root

- startup
mysqld --standalone

- setting up root password
set password for root@localhost=password('newpassord');
type your password instead of newpassword

- login as root
mysql -u root -p

- deleting anonymous accounts
use mysql;
delete from user where User='';
delete from db where User='';
flush privileges;

- create new user
grant create, create temporary tables, delete, execute, index, insert, lock tables, select, show databases, update on *.* to username identified by 'password';
type your username instead of username and password instead of password


Basic Commands

- showing databases
show databases;

- using database
use dbname;
type db name instead of dbname

- show tables in database
show tables;

- show table structure
describe tablename;
type your table name instead of tablename

- import commands from file
source filename
type the wanted file name instead filename with extension (full name)

- import commands from file (external)
mysql -u username -p < filename
type username instead of username and file name instead of filename with extension (full name)

- exit mysql
/q or quit

- help in mysql
/h


Data Bases and Tables Manipulation

- create database
create database dbname;
type data base name instead of dbname

- delete database
drop database dbname;
type data base name instead of dbname


to be continued...

Comments

Popular posts from this blog

SVN Server (Subversion) 1. deo

Apache Subversion (ili Subversion) je softver otvorenog koda sa osnovnom namenom kontrole verzije (Version Control System - VCS) Za sve entuzijaste preporučujem posetu stranici projekta Apache Subversion . Prvi deo objašnjava osnovne koncepte i potrebne komponente za rad servera. Primeri su u potpunosti kompatibilni sa Debian platformom, a rađeni su za Ubuntu i njegove derivate (Kubuntu, Xubuntu, Lubuntu...). Ovaj tutorijal se bavi realizacijom subversion servera preko https protokola. Prednost ovakve postavke je u činjenici da se preko zaštićenog kanala bezbedno može pristupiti repozitorijumu uz pomoć svn klijenta (i grafičkog i iz terminala) ili web čitača. Korak 1 - Instalacija sertifikata Za instalaciju openssl komponente potrebno je uneti sledeći niz komandi u terminalnu. sudo apt-get update sudo apt-get upgrade sudo apt-get install openssl Za kreiranje ključa u terminalu ukucajte: openssl genrsa -des3 -out server.key 2048 sada možete unet

Internet pretraga za 5 minuta

web čitač definicija: Web Čitač (eng. Web browser) je klijent program za rad sa www (World Wide Web) internet servisom/protokolom. Danas postoji gomila web čitača, postoje čitači za specifične platforme poput Microsoft Internet Explorer-a i Apple Safari-a, kao i multiplatformski među kojima su najpoznatiji Google Chrome (Chromium), Mozilla Firefox i Opera. Postoje i pretraživači koji Vam pod određenim okolnostima garantuju i apsolutnu anonimnost, kao što je Tor, zasnovan na Mozilla Gecko Engine-u. web pretraživač definicija: Web pretraživač (eng. Web Search Engine) je web aplikacija koja na osnovu unetih parametara vraća veze prema indeksiranim web stranama koje sadrže traženi termin. Postoje stotine web pretraživača na internetu, neki su javno dostupni, dok postoje i pretraživači kojima mogu da pristupe samo određene interesne grupe. Takođe postoje pretraživači koji su se specijalizovali za određene zadatke i postoje internet pretraživači koji vrše višedi

Fascination with a messy code

One of the first projects I got in the company, that I worked at that time, was to observe and automate a process done for a VIP client (automotive industry giant). This process in essence was done by one technician and two key accountants in a period of 2-3 weeks, dependent on the amount of updates and corrections needed. Still it's a big data company, so huge amount of data is in game. First the technician creates an input file for the legacy app and feeds the process with it. Of course he gets the instructions from the key accountant (better to say from the client). After that the app do the calculation for a day and spit out some 35 xls files with 5-8 sheets per file, full of data. That is the point where the fun begins and I jump in. The end result was to be organised in 5 xlsx files wit 4 sheets per file. They should contain sums, groupings and sample data presentation all extracted, recalculated and organised by dynamic rules set by the client. And when I say dynamic I mean