mysql> create table pessoa (id int(10) primary key auto_increment, nome varchar(45) , telefone int(10));
Query OK, 0 rows affected (0.00 sec)
mysql> insert into pessoa (nome,telefone) values ('Command Line',0000);
Query OK, 1 row affected (0.00 sec)
mysql> select * from pessoa;
+----+--------------+----------+
| id | nome | telefone |
+----+--------------+----------+
|...
Sunday, May 27, 2012
Monday, May 14, 2012
Sunday, May 13, 2012
HTML BASIC TAG
TAG
<html></html>
Inicia/termina um documento em HTML.
<head></head>
Define a àrea de cabeçalho, com elementos não visualisáveis na página.
<body></body>
Define a área visível do documento.
CABEÇALHO
<title></title>
Coloca o nome da página na barra de título da janela.
ATRIBUTOS DO CORPO
<body bgcolor=?>
Cor de fundo.
<body text=?>
Cor...
Thursday, May 10, 2012
Mysql : ERROR 1045 (28000) | Solution
root@lucid32:/home/vagrant# mysql -u root -w
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@lucid32:/home/vagrant# /etc/init.d/mysql stop
root@lucid32:/home/vagrant# mysqld_safe --skip-grant-tables &
[1] 1152
root@lucid32:/home/vagrant# 120509 19:36:25 mysqld_safe Logging to syslog.
120509 19:36:26 mysqld_safe Starting mysqld daemon with...
Sunday, May 6, 2012
MySQL | Create New MySQL User
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.15 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, 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...
Mysql | SQL → basic
SQL. key word
SELECT
→ retrieves data from one or more tables
Sintaxe → SELECT * FROM nameTable
Ex: SELECT name , old FROM person
FROM
→ tables involved in the query. Required in each SELECT
Sintaxe → SELECT * FROM nameTable
Ex: SELECT name , old FROM person
WHERE ...
Installing MySQL + Apache + PHP + phpMyAdmin | Linux - Like
$sudo su
#apt-get update
#apt-get -f install mysql-server
Do you want to continue [Y/n]? Y
#apt-get -f install apache2
Do you want to continue [Y/n]? Y
#apt-get -f install php5
Do you want to continue [Y/n]? Y
#apt-get -f install php5-mysql
Do you want to continue [Y/n]? Y
#apt-get -f install phpmyadmin
Do you want to continue [Y/n]? Y
#cp -R usr/share/phpmyadmin/...